In short
H2 subheadings divide the page into main sections, H3s into the sub-points of a section. Set up properly, they form an outline that can be read on its own and that summarizes the page. Once this check is done, every piece of content longer than a few paragraphs follows an H1, H2, H3 hierarchy with no skipped level, with subheadings that say what each section contains.
Why it matters
Visitors skim: they scan the subheadings to find the passage they are interested in. Google points this out in its SEO Starter Guide: break long content into paragraphs and sections, with headings that help people navigate. Its page on ranking results adds that a query word appearing in headings or body text can make a page more relevant.
Screen readers list a page's headings and let users jump from one to the next. MDN recommends not skipping levels on the way down (an H4 directly under an H2): someone navigating by headings is left wondering where the missing heading went.
Generative engines work with passages. Microsoft compares subheadings to chapter titles that mark out slices of content, and advises against vague labels such as “Learn more”. A passage introduced by an explicit subheading makes sense out of context, which makes it easier to reuse.
To keep things in proportion: Google states that the semantic order of headings is great for screen readers but does not matter for its search, and that there is no ideal number of headings. A clean hierarchy is an accessibility and readability requirement, not a ranking lever on its own.
What it improves
- Readability Visitors find the answer without reading everything, which reduces drop-offs on long pages.
- Accessibility Working heading navigation; WCAG criteria 1.3.1 (Info and Relationships) and 2.4.6 (Headings and Labels) better met.
- Relevance The topic's terms appear in section headings. A real but modest effect.
- Snippets and passages Well-delimited sections can be reused in rich results or AI answers. Nothing guarantees it.
- Production An outline approved before writing avoids texts that go round in circles.
How to check
Paste this script into the developer tools console (F12). It prints the page outline, indented, and flags skipped levels:
let previous = 0;
document.querySelectorAll('h1, h2, h3, h4, h5, h6').forEach((h) => {
const level = Number(h.tagName[1]);
const flag = previous && level > previous + 1 ? ' <-- skipped level' : '';
console.log(`${' '.repeat(level - 1)}H${level} ${h.textContent.trim().replace(/\s+/g, ' ')}${flag}`);
previous = level;
});
Expected result: one H1, then H2s that on their own form an understandable table of contents, H3s only under an H2, no “skipped level” and no empty heading.
Other ways:
- Nu HTML Checker: tick the outline option to show the heading outline of a URL.
- axe DevTools: the
heading-orderrule flags levels that increase by more than one. - WordPress block editor: the Outline tab of the document overview marks empty headings and incorrect levels.
- Screaming Frog: the H2 tab spots pages without an H2; for H3s, add a custom extraction (
Configuration > Custom > Custom Extraction, XPath//h3).
How to implement
Before you start: the standard outline
Write the outline before the text, keeping only the headings. Example for a service page of Plomberie Garnier (fictional business):
H1 Boiler servicing in Nantes
H2 What the annual service includes
H3 Gas boilers
H3 Oil boilers
H2 Prices and service contract
H2 Areas covered around Nantes
H2 Book an appointment
H2 Frequently asked questions about boiler servicing
H3 Is an annual service mandatory?
H3 How long does the visit take?
Rules:
- One H2 per main idea, an H3 only to detail an H2 that has at least two sub-points.
- Do not skip a level on the way down: H2 then H3, not H2 then H4. Going back up from an H4 to an H2 is normal.
- Descriptive labels: “Prices and service contract” rather than “Our offers”. Read on their own, the H2s should summarize the page. See use descriptive headings and coherent sections (opens in a new tab).
- Every heading introduces content: no H2 immediately followed by another H2.
- The level states the hierarchy, CSS sets the size: you do not choose H3 because it is “less big”. See avoid purely decorative headings (opens in a new tab).
- No keyword forced into every subheading: vary naturally. See eliminate keyword stuffing (opens in a new tab).
Frequency: there is no official rule. A subheading roughly every 200 to 350 words is a common readability convention; Yoast SEO, for example, checks the distribution of subheadings in its readability analysis.
Template areas count too: a footer with three columns headed in H2 (“Contact”, “Information”, “Follow us”) is acceptable, but these headings should remain few and consistent. A sidebar widget in H1 is not.
WordPress
Versions WordPress 6.4 to 7.1 (block editor); Classic Editor plugin for the classic editor.
Block editor: type ## then a space at the start of a line to create a level 2 Heading block, ### for level 3; the level can then be changed in the block toolbar. To convert a bold paragraph used as a fake subheading, click the block icon, then “Transform to” Heading. Open the document overview (icon at the top left of the editor), Outline tab, to check the hierarchy before publishing.
Classic editor: format drop-down list, “Heading 2” and “Heading 3”. Never use “Heading 1” in the content: the theme already shows the post title as H1.
Theme: check in Appearance > Editor > Templates (block theme) or in sidebar.php and footer.php (classic theme) the level of widget and footer column headings. The Yoast SEO and Rank Math plugins flag when the main keyword is missing from subheadings: treat that signal as a reminder, not an obligation.
Shopify
Versions Shopify admin, all plans, Horizon and Dawn themes, November 2026.
In the rich text editor for product, collection, page and blog post descriptions, the formatting button offers levels Heading 1 to 6. Since the product or post title is already the H1, start at Heading 2. The “Show HTML” button lets you check the result.
Homepage section headings depend on the theme: on the homepage, keep section labels that really describe their content.
Horizon theme
Horizon, the default theme for new stores, and the themes derived from it build sections with Text blocks. The heading level comes from the format applied in the block's text field (Heading 2, Heading 3); the block's typography preset setting (H1 to H6, Paragraph) only changes the appearance, not the tag. So apply the heading format to the text itself, then check the source code of the published page.
Dawn theme
In Dawn and the themes derived from it, the headings of theme editor sections (Rich text, Image banner, Featured collection) are <h2> elements, and the “Heading size” setting only changes the appearance.
PrestaShop
Versions PrestaShop 8 and 9, Classic and Hummingbird themes.
Product and category descriptions use a rich text editor whose format list offers heading levels. Since the product name is the H1, structure the long description with H2s and H3s. Also check the headings of homepage and footer modules in the child theme.
Wix
Versions Wix Editor and Wix Studio, all plans, November 2026.
Apply the Heading 2 and Heading 3 styles to subheadings, and keep Heading 1 for the main heading only. If a subheading needs to be smaller or larger than its style, change its size rather than its level.
Squarespace
Versions Squarespace 7.1, all plans, November 2026.
In a text block, apply heading formats to subheadings, starting at level 2 under the page title. On blog posts, the post title is generated by the template: do not add a “Heading 1” in the body.
Webflow
Versions Webflow Designer and Editor, all plans, November 2026.
For a Heading element, choose the tag (H2, H3) independently of the style class. In a collection Rich Text field, writers choose the level in the formatting bar; document the “H2 then H3” rule in the project's editorial guidelines.
Laravel
Versions Laravel 10 to 13.
In Markdown content rendered by Str::markdown(), ## produces an <h2> and ### an <h3>. To block skipped levels before publication, add a validation rule on the body:
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
class SequentialHeadings implements ValidationRule
{
public function validate(string $attribute, mixed $value, Closure $fail): void
{
preg_match_all('/^(#{1,6})\s/m', (string) $value, $matches);
$previous = 1;
foreach ($matches[1] as $hashes) {
$level = strlen($hashes);
if ($level === 1) {
$fail('The main heading is already the H1: start subheadings with ##.');
return;
}
if ($level > $previous + 1) {
$fail("Skipped heading level: H{$level} after H{$previous}.");
return;
}
$previous = $level;
}
}
}
Use it in the form request: 'body' => ['required', 'string', new SequentialHeadings()]. It does not recognize code blocks: a comment line starting with # inside a code block triggers a false positive. To add anchors to subheadings, see add a table of contents and anchors to long content (opens in a new tab).
Next.js
Versions Next.js 15 and 16 (App Router and Pages Router), with @next/mdx.
In MDX, ## and ### produce <h2> and <h3>. In React components, choose the tag according to the block's place in the page, not its appearance. For a component reused at several levels, pass the level as a prop:
type SectionTitleProps = { as?: 'h2' | 'h3'; children: React.ReactNode }
export function SectionTitle({ as: Tag = 'h2', children }: SectionTitleProps) {
return <Tag className="section-title">{children}</Tag>
}
Astro
Versions Astro 5 to 7 (content collections with render()).
Rendering a collection entry returns the list of its headings, with their depth, text and identifier. Use it to check the hierarchy at build time:
---
import { getEntry, render } from 'astro:content';
const entry = await getEntry('blog', Astro.params.slug);
if (!entry) {
return Astro.redirect('/404');
}
const { Content, headings } = await render(entry);
const skipped = headings.find((h, i) => i > 0 && h.depth > headings[i - 1].depth + 1);
if (skipped) {
throw new Error(`Skipped heading level in ${entry.id}: “${skipped.text}”`);
}
---
<article>
<h1>{entry.data.title}</h1>
<Content />
</article>
Common mistakes
- Bold paragraphs instead of subheadings: visually similar, they appear in no outline, for neither search engines nor screen readers.
- Choosing the level for its size: an H4 because the H3 is “too big”, or an H2 to highlight a sentence.
- Vague labels: “Introduction”, “Details”, “Learn more”, “Conclusion”.
- One subheading per paragraph: the outline loses its hierarchy and the page becomes a list of fragments. See avoid artificial chunking aimed at AI (opens in a new tab).
- The same keyword in every H2, at the expense of meaning.
- Inconsistent template headings: widgets in H1, product cards in H2 in the middle of an article, hidden modal headings slipping into the outline.
Frequently asked questions
Is it a problem to skip a heading level, for example from H2 to H4?
For Google, heading order does not matter: its Starter Guide states that semantic order is great for screen readers but makes no difference to search. Skipping a level does, however, get in the way of people who navigate from heading to heading, and accessibility tools such as axe flag it. Fix it: it is quick, and the visual size can be set in CSS without changing the level.
How many H2s should a page have?
There is no ideal number of H2s, as Google says explicitly. Use one H2 per main idea of the page: three or four for a short service page, more for a long guide. A common readability benchmark is one subheading every 200 to 350 words. If the outline of H2s read on its own does not summarize the page, sections are missing or poorly named.
Should the main keyword go in the H2s?
Not systematically. The main keyword is already in the H1; the H2s should name their section precisely, which naturally brings in the topic's terms and their variants. Google states that query words present in headings can strengthen relevance, but repeating the same phrase in every subheading hurts readability and can amount to keyword stuffing.
Resources
- MDN: heading elements h1 to h6developer.mozilla.org
- Google Search Central: SEO Starter Guidedevelopers.google.com
- W3C: Understanding Success Criterion 2.4.6 Headings and Labelsw3.org
- Deque: axe rule heading-orderdequeuniversity.com
- Microsoft Advertising: Optimizing your content for inclusion in AI search answersabout.ads.microsoft.com
- Shopify Help Center: Using the rich text editorhelp.shopify.com
- W3C Nu HTML Checkervalidator.w3.org
Updated on
Topic checklist (PDF)