HTML headings: h1 to h6
Your roadmap for this lesson
- The six heading levels
- Building an outline with heading levels
- Why size is not the reason to pick a heading
- How screen reader users jump between headings
Short answer
HTML has six heading levels, <h1> to <h6>. <h1> is the main topic of the page, <h2> marks major sections, and <h3> marks subsections inside those. Pick a level by its place in the outline, not by how big it looks. You can change size later with CSS.
Six levels
<h1>Visiting Albay</h1>
<h2>Things to do</h2>
<h3>Cagsawa Ruins</h3>
<h3>Mayon Skyline View Deck</h3>
<h2>Where to eat</h2>
<h3>Bicol Express spots</h3>
Read only the headings and you get the whole outline of the page. That is the goal.
Heading levels as an outline
Think of a table of contents:
- h1: the book title. Use one per page.
- h2: chapters.
- h3: sections inside a chapter.
- h4 to h6: deeper levels, rarely needed on simple pages.
Go down one level at a time. Do not jump from h2 to h4. You can jump back up at any time, for example from h3 to the next h2.
Do not pick headings by size
Browsers show h1 large and h6 small by default. Beginners often choose h4 because it looks right. That breaks the outline. Choose the correct level, then style the size with CSS.
Also, do not use a heading just to make normal text bold. Use <strong> for that.
Why headings matter for accessibility
Many screen reader users navigate by headings. In NVDA or VoiceOver, they press a key to jump from heading to heading, like skimming. A clean heading structure lets them find the section they need in seconds. Search engines also use headings to understand the topics on a page, which you will cover in Lesson 9.2.
Try it: fix the outline
This menu page uses headings by size and skips levels. Make one h1, use h2 for the menu groups, and h3 for each dish.
Live preview
Quick quiz
Common mistakes
- Skipping levels. Going from h2 to h4 confuses the outline.
- Using headings for bold text. Use <strong> for emphasis inside a paragraph.
- No h1 at all. Every page needs a clear main heading.
Your action
Tick each item when you can do it. Your progress saves on this device.
Key terms
- Heading
- An element from h1 to h6 that titles a section.
- Heading hierarchy
- The order of heading levels that forms an outline.
- Screen reader
- Software that reads a page aloud, like NVDA or VoiceOver.
- Document outline
- The structure formed by a page's headings.
Questions beginners ask
Can I have more than one h1?
HTML allows it, but one h1 per page is clearer for readers and the common best practice.
Should the h1 match the title tag?
They can be similar. The title is for search results. The h1 is for people already on the page.
Can I put a link inside a heading?
Yes. <h2><a href="...">Text</a></h2> is valid.
Related lessons
Need a website built or fixed while you practice? The team at Remar Digital can help.