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.
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
- One
h1that names the page. HTML allows severalh1elements as long as they are not nested, but MDN calls a single one best practice: everyh1is announced as level 1, so a second one competes with the page title in the heading list. - No outline algorithm. Older HTML drafts let an
h1inside a<section>count as a lower level. Browsers and screen readers never implemented that, and the standard dropped it: nestingh1elements in sections is now non-conforming. - Do not skip levels going down. After an H2 comes an H3, not an H4. MDN and the W3C headings tutorial both say a skipped level leaves people navigating by headings looking for one that is not there. Going back up (an H4 followed by a new H2) is normal when a section ends.
- Headings describe their section. WCAG 2.2 success criterion 2.4.6 (level AA) asks that headings describe topic or purpose, and 1.3.1 (level A) asks that structure shown visually is also in the markup. "Introduction" and "More info" pass the second and fail the first.
- Size is a CSS decision. Pick the level by structure and set
font-sizein CSS; do not reach for an H4 because it is smaller.
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):
| Markup | In the accessibility tree |
|---|---|
<h1>Page title</h1> | Heading, level 1 |
<h3> straight after the h1 | Heading, 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-level | Heading, 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?
Do heading tags directly impact rankings?
Should H1 and title tag be the same?
Use the Heading Hierarchy Checker β free, no signup required.
β‘ Open Heading Hierarchy Checker- [1]Google Search Central, SEO Starter Guide: number and order of headings (updated Dec 10, 2025) β
- [2]Google Search Central, Influencing title links (updated Dec 10, 2025) β
- [3]WebAIM, Screen Reader User Survey #10 Results (1,539 respondents, Dec 2023 to Jan 2024) β
- [4]MDN, <h1>-<h6>: The HTML Section Heading elements, checked Oct 13, 2026 β
- [5]MDN browser-compat-data, html.global_attributes.headingoffset, checked Oct 13, 2026 β
- [6]WHATWG HTML issue 7867: remove the section-dependent h1 styles β
- [7]W3C WAI Tutorials, Page Structure: Headings β
- [8]W3C, Understanding WCAG 2.2 SC 1.3.1 Info and Relationships β
- [9]W3C, Understanding WCAG 2.2 SC 2.4.6 Headings and Labels β
- [10]W3C, WAI-ARIA 1.2: heading role (aria-level default 2) β
- [11]Hartley & Trueman (1983), The effects of headings in text on recall, search and retrieval, British Journal of Educational Psychology 53(2), found via Wiley Scholar Gateway β
- [12]Cauchard et al. (2010), Vertical perceptual span and the processing of visual signals in reading, International Journal of Psychology 45(1), found via Wiley Scholar Gateway β
- [13]Prinz-WeiΓ & KΓΆnig (2023), Caption it! The impact of headings on learning from texts, Applied Cognitive Psychology 37(4), found via Wiley Scholar Gateway β