HTML - Space vs. En space vs. Em space

Space

a b c
The cat sat on the mat.

En Space

abnc
The cat sat on the mat.
 

Em Space

abMc
The cat sat on the mat.
 

En Space

The En is as wide as the lower-case letter n. It is half the width of the Em. I.e. 1 En = 0.5 Em.

The En space for a 12 point font is 6 points wide. (Or 8 CSS pixels).


Em Space

The Em is as wide as the upper-case letter M.

The Em size is equal to the current font size.

The Em space for a 12 point font is 12 points wide. (Or 16 CSS pixels).



Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath