Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What the heck is an “em?

em heck
0
Posted

What the heck is an “em?

0

You would be forgiven for thinking that an “em” is equal to the width of the character m, or perhaps the character M. That is one historical meaning for the term, but it’s not what “em” means in common use today and it’s definitely not what “em” means in CSS. The best explanation of “em” comes from traditional print typography. Imagine a series of type blocks (stamps), one for each character in the complete font. To make sure that characters line up on a common baseline, all of these type blocks are of the same height— tall enough to accommodate the characters with the highest ascent above and the lowest descent below the baseline (think of the accent on and the descending loop of g). That height is one “em.” And it is also what we are specifying when we set the font-size CSS attribute. When we don’t force our own setting for font-size, or we change it relatively with percentages, the size of an “em” depends on the user’s default font size… which is usually easy to read on t

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.