Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Basics (2014) Understanding Values and Units Em Units

How do we know what the default px is? Or is it always 16px?


3 Answers

Idan Melamed
Idan Melamed
16,285 Points

"If you do not specify a font size, the default size for normal text, like paragraphs, is 16px (16px=1em)."


It depends on a few things. Basically percentages and em's are both scalable, meaning they'll adjust depending on the size of document. They're both responsive.

This blog gives a great explanation of the differences. He gives a slightly biased answer for his preference for working with percentages. I wouldn't get to hung up on trying to force yourself to use em's in your work but understanding the theory behind them is important because you will come across them in other people's work.

Thanks for both your answers! I get the theory behind ems.. just wasn't sure if 16px was the default size of text unless otherwise stated..

for example.. would there every be a situation where a browser defaults the text size to 12px, instead of 16px?