Heading Hierarchy
Heading hierarchy is the nested order of <h1> through <h6> tags in a page's HTML, with one H1 as the top-level topic and each lower level marking a subordinate point beneath it. It has nothing to do with font size — a heading is defined by its tag, not by how big it looks. Get the nesting right and you give both readers and machines a table of contents they can navigate without reading a word of body text.
Why the hierarchy matters
A reader scans headings before they read anything else, looking for the one that matches what they came for. A crawler or a language model does something similar: it walks the tag tree to work out what the page covers and where each sub-topic starts and ends, independent of your CSS. When the nesting is sound, that walk is fast and unambiguous. When it isn't — headings out of order, or bolded text standing in for real tags — the machine has to guess at boundaries the same way a reader would squint at an unbroken wall of paragraphs. Getting this right doesn't guarantee a citation, but it removes a real obstacle to being parsed correctly in the first place.
How it works technically
HTML gives you six levels, H1 to H6. The H1 is the page's single title, used once, the way a book has one cover title. H2s mark the main sections beneath it; H3s mark the sub-points inside a given H2; and so on down the tree. The rule that matters is sequence: an H2 should be followed by an H3, not by an H4, because skipping a level breaks the logical chain a parser is trying to read. None of this is a font-size control — that's what CSS is for. A heading tag encodes rank in the content's structure, nothing about how large or bold it renders, and search engines and AI crawlers read the tag itself, not the computed style sitting on top of it.
Common mistakes
The most common error is multiple H1s on one page, usually added for visual weight rather than structure, which leaves a parser with no single answer to "what is this page about." Skipping levels is nearly as common — jumping from H2 to H4 because a designer wanted smaller text where a proper subheading belonged. A third failure mode is styling running text to look like a heading (bold, larger, on its own line) without ever using an actual heading tag, so the structure a machine reads from the source code simply isn't there. And vague headings like "More on this" or "Overview" name nothing, so even a well-nested tree ends up useless. A simple test: strip out everything except your headings and read them in order. If that list alone reads as a sensible table of contents, the hierarchy is doing its job.
Relation to AI visibility
Before an AI system can quote or cite a page, it typically has to split that page into smaller chunks, and clean headings are the seams it uses to do that. A precise H2 or H3 sitting directly above the paragraph that answers a specific question makes that paragraph easy to isolate and attribute back to your page. To be clear about what heading structure is not: Google's own guidance for AI Overviews and AI Mode states plainly that no special markup or AI-specific file is required to be eligible for those features, and the same is true of heading tags — they are ordinary HTML semantics, not a ranking hack. Their value is narrower and more durable than that: they make your content easier to parse correctly, for humans and machines alike, which is a precondition for being cited, not a guarantee of it.
Example
Picture a small tax firm in Leipzig publishing a guide to the annual income tax return. The H1 reads "Income Tax Return: The Complete Guide." Beneath it, H2s break out the main chapters: "Which Documents Do You Need," "Deadlines at a Glance," "Common Mistakes." Inside the deadlines chapter, H3s handle the specifics: "Deadline for Mandatory Filing," "Deadline When Using a Tax Advisor." When someone asks an AI assistant "by when do I have to file my tax return," the model can trace straight to that H3 and the short paragraph beneath it, rather than having to infer the answer from a long undifferentiated block of text.
Common questions
Can a page have more than one H1?
Technically the HTML spec allows it, but one H1 per page is still the cleaner practice: it states the page's single main topic without ambiguity. Multiple H1s force a parser to decide which one is authoritative, which is exactly the kind of guesswork clean structure is meant to avoid. Use H2 and below for every subsequent section.
Does a heading's font size affect its rank?
No. Visual size is entirely a CSS decision, and it's independent of the tag underneath it. An H3 can be styled to look bigger than an H2 on the page, but a crawler still reads it as the subordinate level, because rank comes from the tag, not the pixels. Keep those two concerns separate and the structure stays honest even when the design changes.