Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Getting Started with HTML Headings and Paragraphs

What is the default size of h1,h2,...,h6?

What is the default size of h1,h2,...,h6?

5 Answers

Steven Parker
Steven Parker
229,644 Points

The actual size depends on the browser, but here are some approximations:

H1  32px     
H2  24px
H3  18px    
H4  16px
H5  13px
H6  10px

I thought it was CSS that determines how text displays? Why is HTML controlling this, too? It seems redundant and like it could cause confusion.

Steven Parker
Steven Parker
229,644 Points

You're right, these sizes can all be changed in CSS. These are just typical defaults if you dont set them.

Matthew Perry
Matthew Perry
106 Points

Headings provide some SEO benefits when search engines browse your website for content. Since they are common tags, browsers can easily see what is the most important content based off of hierarchy (h1, h2, ... h6, p)

H1 32px
H2 24px H3 18px
H4 16px H5 13px H6 10px

Thanks all!

Size of headings is defined by the browser itself. Some browsers make it bigger other make it smaller.

Steven Parker
Steven Parker
229,644 Points

That's exactly what I meant when I said, "The actual size depends on the browser," :smirk: