SEOMay 8, 2026 Β· Updated Oct 13, 2026 Β· 6 min read

How to Optimize Heading Hierarchy for SEO and Accessibility

What headings do for screen reader users, readers and Google (they matter differently to each), the rules that still hold now the HTML outline algorithm is gone, and what Chromium's accessibility tree does with 12 tricky heading cases.

πŸ“‘
Try the Heading Hierarchy Checker
Free, no signup
β†’
DG
Derek Giordano
Designer & Developer
In this guide
01What Headings Do, and for Whom02The Rules That Still Hold03What a Screen Reader Actually Gets04Two Recent Changes05Checking Your Own Pages

What Headings Do, and for Whom

Headings have three audiences, and they care about different things.

Screen reader users navigate by them. In WebAIM's screen reader survey (December 2023 to January 2024, 1,539 respondents), 71.6% said the first thing they do to find information on a long page is jump through its headings; 13.6% use Find and 6.4% read straight through. Among advanced users the share is 78%, among beginners 47%.

Sighted readers use them too. Hartley and Trueman's nine experiments (British Journal of Educational Psychology, 1983) found that headings helped readers recall, search and retrieve information from a text, whether the headings sat in the margin or in the text. In an eye-tracking study by Cauchard and colleagues (International Journal of Psychology, 2010), readers looked back at headings while reading and recalled more topics when the headings stayed visible. Prinz-Weiß and Kânig (Applied Cognitive Psychology, 2023) found headings improved comprehension for 51 students, though not their memory of details.

Google cares least about the structure itself. Its SEO Starter Guide says semantic heading order is fantastic for screen readers, but from Google Search's perspective it does not matter if headings are out of order, and there is no ideal number of headings. Headings matter to Google in one specific place: the h1 and other headings are among the sources it uses to write the title link in results (see our meta tags reference).

The Rules That Still Hold

What a Screen Reader Actually Gets

Screen readers do not read your tags directly. They read the browser's accessibility tree, and the tree applies rules a tag-counting checker can miss. We put 12 heading-like elements on one test page and read Chromium's accessibility tree back through the DevTools protocol (October 13, 2026):

MarkupIn the accessibility tree
<h1>Page title</h1>Heading, level 1
<h3> straight after the h1Heading, level 3 (the skip is kept)
<div role="heading" aria-level="2">Heading, level 2
<h4 aria-level="2">Heading, level 2: aria-level overrides the tag
<h2 hidden>Not exposed
<h2 aria-hidden="true">Not exposed
<h2 style="display:none">Not exposed
<h2><img alt="Pricing"></h2>Heading, level 2, named "Pricing"
<h2></h2>Heading, level 2, with no name
<section><h1>...</h1></section>Heading, level 1 (no re-leveling)
<div role="heading"> with no aria-levelHeading, level 2 (the ARIA default)
<h2 role="presentation">Not a heading

Twelve elements, 8 headings. Our own Heading Hierarchy Checker failed this test when we ran it: it only counted h1 to h6 tags by name, so it listed 10 headings and matched 4 of the 8. It missed both ARIA headings, kept the h4 at level 4, counted all three hidden headings and the role="presentation" one, and called the image heading empty. We rebuilt it to follow the same rules; it now matches all 8.

One limit applies to any checker that works on pasted HTML: it cannot see a heading hidden by a stylesheet class. For that, open the page in the browser and check the accessibility panel in DevTools, which shows the tree as screen readers get it.

Two Recent Changes

In May 2025 the HTML standard removed the default styles that made an h1 inside <section>, <article>, <aside> or <nav> render smaller, the last visual trace of the outline algorithm. If an old design relied on that shrinking, MDN suggests setting h1 { margin-block: 0.67em; font-size: 2em; } explicitly.

A new pair of attributes, headingoffset and headingreset, will let a component shift the levels of the headings inside it, which is what the outline algorithm promised. MDN's compatibility data lists headingoffset as experimental: Chrome and Edge 151 behind the experimental web platform features flag (July 2026), a Firefox preview behind a preference, nothing in Safari. Until it ships, a reusable component needs either the right tag for where it is used or an aria-level.

Checking Your Own Pages

Paste the rendered HTML (DevTools, then Copy outerHTML on the body) into the Heading Hierarchy Checker. Source from View Source is fine for static pages, but client-rendered apps add their headings after load. Then check what the outline says against what the page is about: the checker can confirm the levels, not whether "Overview" tells anyone what the section holds.

Running the same rules over our own guides found little to fix: 375 posts, 3,012 headings, no skipped levels, no empty headings and one h1 per post. The heading problems we did find on this site were elsewhere: lists of contents that no longer matched the headings after rewrites, which our build now checks on every post.

Frequently Asked Questions

Can a page have multiple H1 tags?+
Yes. HTML allows several h1 elements as long as they are not nested, and Google says the number of headings does not matter for Search. MDN still recommends one h1 that describes the page, because screen readers announce every h1 as level 1: the old outline algorithm that would have demoted an h1 inside a section was never implemented and has been removed from the standard.
Do heading tags directly impact rankings?+
Google's SEO Starter Guide says that from Google Search's perspective it does not matter if headings are out of order, and that there is no ideal number of headings. Headings do matter to Google in one place: the h1 and other headings are among the sources it uses for the title link in results. The strongest reason to get them right is the 71.6% of screen reader users who navigate by headings first (WebAIM survey, 2024).
Should H1 and title tag be the same?+
They can differ. The title tag is the main source for the result title and the browser tab; the h1 is the visible page heading, and Google lists both among the sources for title links. Keep them consistent in meaning even when the wording differs, so Google has no reason to use other text from the page.
Try it yourself

Use the Heading Hierarchy Checker β€” free, no signup required.

⚑ Open Heading Hierarchy Checker
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.