HTML Headings: Build a Clear Heading Hierarchy
Choose headings by level
Headings describe the organization of a page. Use h1 for its main topic and h2 for major subsections. Levels h3 through h6 describe progressively deeper subsections. Choose the level for meaning, not font size.
<h1>City garden</h1><h2>Plants</h2><h3>Herbs</h3><h2>Tools</h2>Plants and Tools are sibling topics; Herbs belongs under Plants.
Navigate a document
Assistive technology can offer a list of headings. Make each heading descriptive even when read alone. A simple page usually benefits from one main h1; multiple h1 elements are not automatically a syntax error.
<h1>Bike repair</h1><h2>Brake checks</h2><p>Inspect the pads.</p><h2>Tire checks</h2><p>Check pressure.</p>The heading levels remain consistent even though the paragraphs differ.
Avoid confusing hierarchy
Do not jump from h1 to h4 merely to make text smaller. Returning from a deep subsection to a higher-level heading is normal. Use CSS later to change appearance without changing structure.
<h1>Workshop</h1><h2>Materials</h2><h3>Wood</h3><h2>Schedule</h2>The last h2 starts a new major topic.
Practice and next steps
Change the garden example into a page about music. Add two major topics and one subsection without skipping a level.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Heading hierarchy — Knowledge Check
Apply the concepts from Heading hierarchy.
Which heading should introduce a subsection within an h2 section?
Why choose heading levels independently of size?
After an h3 subsection, which heading starts another major section under h1?
A heading looks too large. What should you change while keeping its logical rank?
A page has one h1 and two independent topics below it. Which rank fits both topics?