On-Page SEO

HTML heading structure H1–H6: complete guide for SEO

Article cover: HTML heading structure H1–H6

H1–H6 is the semantic hierarchy of a document, not just font size. How to build the right heading structure for SEO, readability and accessibility.

HTML provides six heading levels — from <h1> to <h6>. Most authors know that H1 matters for SEO. But few understand the role of H2, H3, and deeper levels, how they interact with search crawlers, and why a broken hierarchy harms both SEO and users.

For a Google crawler, heading tags are the table of contents of a document. The robot uses them to determine the page topic, identify sub-topics, and decide how relevant the document is to a given query. A missing level, an extra H1, or a heading used purely for visual styling destroys this map.

Heading hierarchy as a tree: H1 is the root, H2 are main branches, H3 are leaves. Search engines read it as the document's table of contents.
Heading tags carry a triple load: semantics for search engines, structure for screen readers, and visual anchors for users who scan a page rather than read it linearly. All three audiences matter.

What are H1–H6 heading tags

H1–H6 are semantic HTML elements marking headings at six levels of importance. H1 is the main page heading; H6 is the deepest nested sub-heading. Each level sends the crawler a signal: "the content inside this section is about this topic."

6

Heading levels

HTML provides H1–H6. In practice most pages use only H1–H3

~8%

Pages without H1

Per HTTPArchive, about 1 in 12 pages on the web has no H1 tag

33%

Google pulls from H1

Share of snippets where Google uses H1 text instead of title (Zyppy, 2021)

~40%

Traffic to H2 queries

Estimated share of organic traffic arriving via secondary queries covered by H2 headings

Unlike visual formatting (<b>, <big>, CSS classes), heading tags carry meaning. Browsers render H1 as large bold text by default, but size is just a side effect. You can make H6 visually larger than H1 through CSS, but that won't change the semantics — for search engines and screen readers, H1 is still the primary heading.

Hierarchy: H1, H2, H3 and deeper

A correct heading hierarchy works like a book's table of contents: one book title (H1), several chapters (H2), sub-sections within chapters (H3), and detail paragraphs below that (H4+). Breaking this structure is like tearing chapters out of a book and shuffling the pages.

Correct heading hierarchy on a web page.
HTML
<!-- Correct hierarchy -->
<h1>Guide to Welders' Protective Clothing</h1>

  <h2>Types of protective clothing</h2>
    <h3>Fire-resistant suits</h3>
    <h3>Protective masks</h3>

  <h2>Regulatory standards</h2>
    <h3>EN ISO 11612</h3>
    <h3>ANSI/ISEA standards</h3>

  <h2>How to choose</h2>

<!-- Wrong hierarchy (skipped levels) -->
<h1>Guide to protective clothing</h1>
  <h3>Fire-resistant suits</h3>  <!-- H2 skipped! -->
    <h5>Standards</h5>           <!-- H4 skipped! -->
You cannot skip heading levels downward: you cannot jump from H1 directly to H3 without an H2. This is called a "hierarchy break" — the crawler loses context, and a screen reader announces a structural error to the user. Heading levels must descend sequentially; skipping upward when closing a section is fine.

H1 — page topic

Exactly one per page. Describes the entire document, contains the main target keyword. The first visual element a user sees on landing.

H2 — sections

Divide the page into major thematic blocks. Each H2 is a potential entry point for secondary queries and a source for featured snippets.

H3–H6 — details

H3 nests inside H2, H4 inside H3. Most articles need only three levels. H4–H6 appear in complex technical documents and reference material.

When H4–H6 are needed

H4, H5 and H6 are used rarely — only in large technical documents requiring a fourth or deeper nesting level. Examples: legal contracts, API documentation, medical protocols. For blog articles and landing pages, three levels (H1–H3) cover everything you need.

Practical rule: if you're thinking "maybe I need an H4" — first ask whether you can restructure the content to stay within H3. Deep nesting complicates screen reader navigation and reduces readability for all users.

How headings affect SEO

Every heading tag is a relevance signal. The higher the level, the stronger the signal: H1 outweighs H2, H2 outweighs H3. But all of them participate in assessing how closely a document matches a search query.

TagSEO roleWhere to place keywords
H1Primary topic signal. Google may substitute it for title in the snippetPrimary target query — once, naturally
H2Secondary topics and sub-queries. Appears in featured snippets and People Also AskSecondary queries, LSI terms, questions from search
H3Elaboration of H2. Lower direct impact but helps with long-tail rankingRefinement queries, specific examples, instruction steps
H4–H6Minimal direct SEO impact. Used as structural elementsNo need to target specific keywords

Google uses headings to generate featured snippets. When a user asks a question, the algorithm looks for pages where an H2 or H3 matches the query closely and the next content block gives a direct answer. Well-crafted H2 headings are free candidates for position zero.

Featured snippet tactic: phrase H2 and H3 headings as questions or direct answers to questions. "How to set up a canonical URL" beats "Canonical URL setup". Follow each such heading with a concise 40–60 word answer in the next paragraph.

Headings also feed internal linking: anchor text matching the H2 of the target page reinforces relevance. And sitemaps: some CMSs automatically add id attributes to headings, creating anchor URLs that can be referenced directly in XML sitemaps for deep page sections.

Accessibility and screen readers

Screen readers — assistive software for users with visual impairments — use heading tags as the primary navigation mechanism on a page. The user presses H to jump between headings, hearing the page's table of contents. A broken heading hierarchy makes navigation useless.

Audiences depending on correct heading structure

Proper hierarchy is critical for three groups of users

People with visual impairments (screen reader users)~2.2% of population
Users with cognitive disabilities (structure aids orientation)~15% of population
All users scanning the page before reading~79% of sessions

Under WCAG 2.1 (criterion 1.3.1 "Info and Relationships"), headings must be implemented via semantic HTML tags, not styles. A button with font-size: 24px; font-weight: bold is not a heading for a screen reader. <h2> is. The difference is enormous.

Google indirectly factors in accessibility when ranking: pages with correct semantics are parsed more accurately by the crawler, receive more precise snippets, and generate fewer user complaints. Good accessibility = a stronger content quality signal.

Rules for using headings

Five rules that cover 95% of real-world situations.

Rule 1One H1 per page

H1 marks the topic of the entire document — and there is only one topic. Multiple H1s dilute the signal and confuse screen readers. HTML5 technically allows multiple H1s inside different <section> elements, but Google still processes pages as flat documents.

Rule 2Never skip levels downward

H1 is followed by H2, H2 by H3. Do not jump from H1 to H3. This breaks the hierarchy and violates accessibility. Closing a section and returning to a higher level is fine — only skipping downward is forbidden.

Rule 3Keywords in H1 and H2

Primary query in H1. Secondary queries and LSI terms in H2. H3 and deeper cover specific details — keyword targeting is not a priority there. Do not stuff: one query per heading.

Rule 4Headings describe sections, not decorate

A heading tag is not a font-size tool. If you're using H3 just to make text bigger — use <strong> or a CSS class. Apply headings only where a new logical section begins.

Rule 5Write for humans, not bots

A heading must be instantly clear to a user. "How to choose a welding suit: 4 criteria" is good. "Welding suit buy characteristics" is not. Natural language works better for both users and search engines.

Common mistakes in heading structure

These errors appear in audits of most sites — from small blogs to enterprise platforms.

  • Multiple H1s on the page. Most often caused by visual builders that wrap any large block in H1. Find with Screaming Frog → H1 → Multiple. Fix: keep one H1, replace the rest with H2 or styled <div>.
  • Headings used for styling, not semantics. A designer chose H4 because it "looks the right size", skipping H2 and H3. The crawler sees H1 → H4 → H1 → H4 — chaos instead of structure.
  • Missing H1. After a redesign or CMS migration the H1 disappears from the template. A page without H1 loses its main on-page relevance signal.
  • H1 = site name on every page. A CMS template injects the company name into H1 globally. Every page gets the same H1 — site-wide duplicates, zero relevance.
  • Skipped levels when nesting. H1 → H3 (H2 missing), H2 → H4 (H3 missing). The screen reader reports an error; the crawler loses the sub-section context.
  • Using <p> or <div> instead of heading tags. Text looks like a heading visually but is invisible as a heading to search engines and screen readers. Common in legacy templates.
  • Headings that are too long. An H2 with three sentences is not a heading — it is a paragraph. A heading should be readable in one eye movement: 4–12 words is optimal.
Code example of common heading structure mistakes:
HTML
<!-- BAD: typical template with errors -->
<div class="title">Workwear catalogue</div>    <!-- not H1! -->
<h1>Acme Workwear Ltd</h1>                     <!-- H1 = company name -->
<h1>Winter workwear</h1>                       <!-- second H1 -->
<h3>Fire-resistant suits</h3>                  <!-- H2 skipped -->

<!-- GOOD: correct structure -->
<h1>Winter welders' workwear catalogue</h1>
  <h2>Fire-resistant suits</h2>
    <h3>Suits to EN ISO 11612</h3>
    <h3>Suits to ANSI Z49.1</h3>
  <h2>Protective masks and shields</h2>
Never use heading tags to visually style text. "I like how H2 looks — I'll use it here for aesthetics" is a common mistake by developers and content managers. Use CSS classes for styling; headings are only for logical document structure.

Tools for auditing heading structure

ToolTypeWhat it checksFree
Screaming Frog SEO SpiderDesktopH1–H6 across the whole site: missing, duplicates, lengthUp to 500 URLs
Chrome DevTools (Elements)BrowserSemantics of a specific page, nesting, heading idsYes
HeadingsMap (Chrome/Firefox extension)ExtensionVisual heading map of the page in real timeYes
WAVE Web Accessibility ToolOnline / extensionAccessibility errors: skipped levels, missing H1, wrong orderYes
Netpeak SpiderDesktopMass crawl: H1–H3 across the whole site, Excel exportTrial
Google Search ConsoleOnlineIndirectly: which headings Google uses in snippetsYes
Ahrefs Site AuditOnlineMissing H1, multiple H1, H1 = title, heading lengthPaid
Quick manual check: open the page, press F12 → Console, type $$('h1,h2,h3,h4,h5,h6').map(h => h.tagName + ': ' + h.textContent.trim()) — you get the full ordered list of headings on the page.
JAVASCRIPT
// Quick heading hierarchy check in the browser console
const headings = $$('h1,h2,h3,h4,h5,h6');
const report = headings.map(h => ({
  tag: h.tagName,
  text: h.textContent.trim().slice(0, 60)
}));
console.table(report);

// How many H1s are on the page?
const h1Count = $$('h1').length;
console.log(`H1 count: ${h1Count}`, h1Count === 1 ? '✓' : '✗ ERROR');

Heading structure checklist

H1

  • Exactly one H1 on every page of the site
  • H1 contains the primary target query for the page
  • H1 aligns in meaning with the title tag (wording may differ)
  • H1 is unique site-wide — not duplicated by template
  • H1 is not empty, does not contain only an image, and is not hidden via CSS

H2

  • H2 follows H1 without skipping a level
  • Each H2 describes a distinct major section of the page
  • H2s contain secondary queries and LSI terms (naturally, without stuffing)
  • H2 phrasing can serve as a featured snippet anchor
  • No H2 exists purely for visual effect — only where a new thematic section begins

H3–H6

  • H3 nests inside H2, H4 inside H3 (no skipping levels downward)
  • H4–H6 are used only when deep nesting is genuinely required
  • No H3–H6 tag is used instead of H2 just because of its visual size
  • The overall structure reads as a logical table of contents when scanned

Accessibility

  • Heading order verified with HeadingsMap or WAVE extension
  • All headings implemented as semantic HTML tags, not styled divs
  • No hidden headings (display: none, visibility: hidden)
  • Every heading carries meaningful content — no empty or placeholder headings
If your heading structure reads as a logical table of contents without any body content — you're on the right track. Reading only the headings, a user should understand what each section contains and decide whether to read further.

FAQ

Answers to the most common questions about heading structure that come up in audits and content team workshops.

HTML5 formally allows multiple H1s inside different `<section>` elements — this is the "outline algorithm". But in practice Google and most screen readers process the page as a flat document and treat multiple H1s as an error. Practical rule: one H1 per page.
There is no direct "more headings = better" relationship. Structure matters, not count. A page with three well-written H2s outperforms a page with twenty meaningless H2s. The number of headings should reflect the volume and logic of the content.
Not strictly required for SEO, but useful. `id` on headings creates anchor links (`/page#section`) — convenient for users and enabling deep linking. For featured snippets Google may use anchor URLs. CMSs and SSGs (Next.js, Gatsby) typically generate ids automatically.
Yes. H2 and H3 headings are candidates for ranking on secondary and long-tail queries. Google can surface an individual H2 in a featured snippet or People Also Ask box, even if the full URL ranks for a different query. This is especially valuable for long-form guides.
Logos, navigation, and page headers are not content headings. Do not use H1–H6 for a company name in the site header, menu items, or button labels. Use `<a>`, `<nav>`, `<span>` or `<p>` with appropriate styles. H1 should be the first heading inside the main page content.