This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

1222 points
C441ff3879fe555188d7b27f20afe523?s=140&d=retro
Submitted by
soundingjet
over 4 years ago

Does "em" stand for something?

These HTML lessons have been great about putting a name with a shortened code word (href is hyperlink reference...src is source...etc). Knowing the relationship between what you type in the code and it's real meaning helps my understanding.

Does "em" stand for something?? This is the em used instead of px when defining the size of text.


1 vote

permalink

An em is equivalent to the width of a letter m. Ems allow you to change the size of text relative to the size of the text in the parent element.

for instance, if the font-size of the document is 12pt, 1em is equal to 12pt. Ems are scalable in nature, so 2em would equal 24pt, .5em would equal 6pt, etc. Ems are becoming increasingly popular in web documents due to scalability and their mobile-device-friendly nature.

575 points
510c05f7b0e2e35c8b0019f8_197333134
Submitted by
Steve McGeachy
over 4 years ago

1 Comment

5357f80552f86369650006c5_794102226 Sangeeth Sudheer over 4 years ago

Its an old definition. Its deprecated now and nowadays, the size of M is less than the one traditionally applied. It is normally taken roughly as 16 pixels size. i.e, 1 em = 16 px


0 votes

permalink

Eric, I must congratulate you again, this exercise is great.

3849 points
507d74b67c0cb402000029c1_173270234
Submitted by
Alberto Pazuello
over 4 years ago