H1–H6 Headings for SEO: Hierarchy, Accessibility and AI
H1–H6 headings divide a page into sections and subsections: the H1 is usually the main title, an H2 opens a section, and further levels go deeper. According to Google, the order and number of headings don't matter to the search engine, and the "one H1 per page" rule doesn't come from its documentation. What does matter is whether the page's main title can be identified unambiguously, because headings are one of the sources of the title link in results. The order of levels is first and foremost an accessibility issue: the HTML specification requires a hierarchy without skipped levels going down, and the W3C recommends it because skipped levels confuse readers. For AI features in Search, Google sets no separate requirements.
What H1–H6 Headings Are in HTML
HTML has six heading elements, from <h1> to <h6>. Each one carries its level in its name: <h1> opens the top level, <h2> a subsection of it, <h3> a subsection of that subsection. The HTML specification maintained by WHATWG defines a document's outline simply as all of its headings in the order they appear in the code. That outline is what tables of contents are meant to be generated from, and an entry in an interactive table of contents should take the reader to the corresponding heading.
The specification sets two requirements. If a document has any headings at all, at least one of them should be level 1. Each following heading can go at most one level deeper than the previous one and can come back up by any number of levels, so an <h2> can be followed by an <h3>, but not straight away by an <h4>. These are rules for a well-formed document, not search engine requirements, and it's worth keeping the two apart.
This article goes deep on a single topic: what a search engine does with headings, what screen readers do with them, and what's known about their role in AI features. Title tags, meta descriptions and the other elements of a page's head are a separate subject, and we touch on them here only where they meet the H1.
One H1 or Several: What Google Says
"One H1 per page" is one of the most repeated rules in SEO, and it isn't in Google's documentation. In its section on things not to worry about, Google's SEO Starter Guide says there's no magical, ideal number of headings a page should have. It adds, with a wink, that if you think it's too many, then it probably is.
Google does have one recommendation tied to the H1, and it concerns the clarity of the title, not the number of headings. In its documentation on title links, Google recommends making it clear which text is the main title of the page. When it generates a title link, Google considers the main visual title, headings and other large, prominent text, and trouble starts when several headings carry the same visual weight. The documentation offers two fixes: a larger font or placing the title in the first visible <h1> element.
So in practice, a single clear H1 is a good choice, but for a different reason than the one usually given. It isn't about a penalty for a second H1. It's about leaving neither the search engine nor the reader in any doubt about what the page's title is. A site with its logo in an <h1> on every page and the real title in an <h2> doesn't break any Google rule, but it makes exactly the one thing Google asks for harder.
Heading Order and Accessibility
Google's Starter Guide says plainly that headings in semantic order are fantastic for screen readers, but from Google Search's perspective it doesn't matter whether they're used out of order. The reasoning is practical: the web in general isn't valid HTML, so Google Search can rarely depend on the semantic meanings set out in the specification. For ranking, a jump from H2 to H4 isn't a problem.
For people, it is. The W3C tutorial on headings recommends nesting headings by their level and avoiding skipped levels where possible, because skipping is confusing. The tutorial's example: an <h2> shouldn't be followed directly by an <h4>. Jumping back up when you close a subsection is fine, so a new <h2> can follow an <h4>. A separate note covers the fixed parts of a page, such as a sidebar: their headings should have the same level on every page, regardless of the content next to them.
Screen reader users often browse a page by its headings, jumping from one to the next or from level to level. An outline without skipped levels then works like a table of contents. An outline in which a sidebar widget's title sits at a higher level than the article's sections, and a plain paragraph has been styled to look like a heading, leads people to the wrong places. That's an argument for order that doesn't need any support from rankings.
Headings, Passages and AI Features in Google
In its guide to Google Search ranking systems, Google describes passage ranking as an AI system it uses to identify individual sections, or passages, of a web page to better understand how relevant a page is to a search. The documentation doesn't say how the system draws the boundaries of a passage. Still, a heading that announces what a section is about, and a section that starts with the answer, make the job easier for anyone reading a page piece by piece, whether that's a person skimming the text or a machine.
On AI features in Search, Google is unambiguous. In its documentation on AI features, it says that SEO best practices remain relevant for AI Overviews and AI Mode as well, and that there are no additional requirements or special optimizations needed to appear in them. That statement takes precedence over any claim about headings "for AI."
What follows from these two sources is sensible practice, not a trick. A heading should say what's in the section, the section should deliver what the heading promises, and the most important sentence should come near the beginning. That's how you write for a reader who skims, and it also makes it clear where an answer begins and ends. We follow similar logic for navigation trails in our article on breadcrumbs for SEO.
What Google Doesn't Document About Headings
Some popular rules have no basis in the Google documentation cited here. Google doesn't publicly describe a keyword in the H1 as a ranking factor, nor does it say the search engine rewards pages with a single H1. It also gives no optimal length for the text under a heading, and rules like "answer in 40–60 words under every heading" don't come from its documents.
The same goes for headings phrased as questions. A question in a heading can be a good choice when the section answers a specific question a reader has, but Google doesn't describe it as a way to appear in AI Overviews. The AI features documentation says the opposite: there are no special optimizations. So if an audit or a tool recommends rewriting every heading as a question "for AI," it's fair to ask where that rule comes from.
The line is simple. What Google documents is this: there's no ideal number of headings, their order doesn't matter to the search engine, headings are one of the sources of the title link, and there's a system that identifies passages within a page. Everything beyond that is a hypothesis or an editorial practice, and it should be called one.
Headings on This Blog
On this blog, the heading rules are built into the template and checked automatically. The template renders the post title from the article's metadata as the only <h1>, so the article body starts with an <h2> and contains no second top-level heading. The first element of the body is a highlighted, direct answer to the question in the title, and only then come the sections.
The layout rules require at least six H2 sections, each with no less than a set minimum number of words, and the last section is a summary with a link to request a quote. A checking script counts deviations from those rules across the whole blog and doesn't allow their total to rise above a recorded level. These are our editorial rules, not Google's requirements: they're there so that every text has a readable outline and an answer up front, not to satisfy an unconfirmed ranking factor.
What We Look for in a Heading Audit
In audits, we regularly see headings used to style text rather than to structure it: the logo or company name in an <h1> on every page, widget and footer titles in <h2>, and the actual section titles as bold paragraphs. We also see templates where several elements at the top of the page carry the same visual weight, making it hard to tell which one is the main title. That's why we check the outline on the rendered page, not in the content editor.
The main title. We check whether the first visible <h1> is the page's title rather than the logo, and whether it matches what the page is about and what the title element says.
An outline without skipped levels. We list all the headings in the order they appear in the code and look for skipped levels going down, headings in fixed parts of the page whose level changes from page to page, and text styled as a heading without the markup.
Heading and section. We check whether each heading announces what's in its section and whether the most important information comes at the start of the section, not at the end.
Navigating with a screen reader. We move through the page by its headings the way a screen reader user would, because it's the fastest test of whether the outline leads where it should.
Summary
H1–H6 headings are a page's outline. Google doesn't count headings or judge their order, but it does take them into account when generating the title link, so the page's main title should be unambiguous, ideally as the first visible H1. A hierarchy without skipped levels is a requirement of the HTML specification and a W3C recommendation for accessibility. For AI Overviews and AI Mode, Google sets no additional requirements, and headings that announce what a section contains simply serve readability.
Most heading problems come from templates where the markup serves appearance rather than structure. We review the outline on rendered pages as part of our SEO services and audits. If you want the headings on your site to go through that kind of review, request a quote.