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.

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
218,691 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
218,691 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
218,691 Points

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