Content · Web Development · HTML

HTML Heading Structure and Screen Reader Navigation

Heading Structure and Screen Reader Navigation: Try moving through the elements with a keyboard. The labels and relationships matter even when no extra styling has been added. Includes a practical HTML example and an explanation.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Not everyone uses a mouse to explore a website. Good HTML must also make sense through a keyboard or screen reader.

What You Need to Know


Headings are signposts. A visitor can scan them visually, and many screen-reader users jump between them. Use heading levels to show which topics belong inside larger topics, rather than choosing levels because of text size.

In this example: correct a heading hierarchy with skipped levels.

Try the Example


Take a look at the example. We’ll explain the important lines right below it.

<main>
    <h1>School newspaper</h1>
    <section aria-labelledby="science-title">
        <h2 id="science-title">Science</h2>
        <h3>New robotics club</h3>
        <p>Students meet each Thursday.</p>
    </section>
</main>

Let’s Read the Code


  • <main>: The main element marks the primary page content.
  • <h1>: A top-level heading explains what the page is about.
  • aria-labelledby: Aria-labelledby uses the text of another element as the accessible name.
  • id: An id uniquely identifies an element on this page.

Read the named elements and attributes together. They explain how the browser connects this feature to the rest of the page.

What Happens in the Browser?


Try this with Tab and Shift+Tab. If you can, inspect the accessibility tree too; appearance alone does not tell the whole story.

What does assistive technology receive? The example includes aria-labelledby. These relationships can explain names, states, or descriptions when used correctly. They do not automatically move focus, listen for clicks, or create keyboard handling.

Your Turn


Use Tab and Shift+Tab to visit the controls, then read their labels aloud. Is the purpose of each one clear?

Common Beginner Mistakes


  • Judging the page only by how it looks, without checking its meaning and keyboard behavior.
  • Check the same result using both the browser and a keyboard, not only by looking at the screen.

Key Takeaways


  • Headings are signposts.
  • <main>: The main element marks the primary page content.
  • A meaningful HTML element is usually a stronger starting point than adding an ARIA role to a generic div. Also check what happens using only the keyboard.
Share this resourceSend this page to someone who may find it useful.