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) The Box Model Margins

Ermin Mekic
Ermin Mekic
1,063 Points

How to figure out the default font-size?

What if I don't set any specific font-size for a heading, how do I find out what the relative margin to the heading is? Is there a default font-size for h1, h2, h3, etc.?

Thank you.

hungryfr33lanc3r
hungryfr33lanc3r
8,468 Points

Hello, Ermin! If you do not set a font-size, 16px is the default that the browser will implent.

Read more here...

2 Answers

Steven Parker
Steven Parker
216,136 Points

The actual size depends on the browser and/or CSS, but here are some approximations:

H1  32px     
H2  24px
H3  18px    
H4  16px  (also plain inline text)
H5  13px
H6  10px

It depends on the browser, but inspecting the element using developer tools can be helpful.

Here's a course using Chrome Dev Tools..