How to Fix Heading Hierarchy: Nest H2–H6 Without Skips
Your audit flagged pages where heading levels jump, for example an H2 followed directly by an H4, or an H1 followed by an H3. This guide shows you how to find every skip, fix the template-level and in-content causes, and keep new pages from reintroducing them.
Why it matters
Headings are the outline that screen reader users navigate by. A jump from H2 to H4 suggests a missing section and breaks that navigation, which is why it is a common WCAG 1.3.1 (Info and Relationships) finding. Search engines and AI answer tools also use heading structure to work out which passage answers which question. Google has said heading order is not a strong ranking factor on its own. Even so, a clean outline makes it easier to extract sections as featured snippets or cited answers. The audit scores this across the whole site, so one skip in a shared footer or sidebar can fail hundreds of pages at once.
What you need
Step-by-step fix
Print the heading outline of a flagged page
Open a flagged URL, press F12, go to the Console tab and paste the snippet below. It prints every H1–H6 in document order, indented by level, and marks each heading that skips a level. Headings hidden with CSS (mobile menus, off-canvas carts, modals) still count, because the audit reads the source rather than what you see on screen.
(() => {
let prev = 0;
document.querySelectorAll('h1,h2,h3,h4,h5,h6').forEach(h => {
const lvl = +h.tagName[1];
const skip = prev && lvl > prev + 1;
console.log(`${' '.repeat(lvl - 1)}${h.tagName}${skip ? ' <-- SKIPPED from H' + prev : ''}: ${h.textContent.trim().slice(0, 70)}`);
prev = lvl;
});
})();Sort skips into template issues and content issues
Run the snippet on 3–5 flagged pages of different types (homepage, product, blog post, category). Use these rules to classify each skip:
- Template issue: the same skip appears on every page. Typical culprits are footer column titles as H4/H5, sidebar widget titles, "Related posts" cards and newsletter blocks.
- Content issue: the skip appears only in the body text of individual pages, usually because an author picked H3 or H4 for its smaller font size.
Fix template issues first, because one change clears many pages.
Fix headings hard-coded in templates
Edit the theme or component that outputs the skipping heading. Use one of two fixes:
- Change the tag to the level that fits under its parent section. Footer and sidebar titles are usually H2, because they start new top-level regions.
- Turn it into a non-heading element such as a p or div, if the text is a label rather than a section title.
Keep the existing CSS class so the visual design does not change.
<!-- Before --> <h4 class="footer-title">Company</h4> <!-- After: a real section title --> <h2 class="footer-title">Company</h2> <!-- Or: a label that does not need to be a heading --> <p class="footer-title">Company</p>
Decouple heading size from heading level in CSS
Skips usually happen because H4 "looks right" for a sub-heading. Add utility classes so editors and developers can choose the correct semantic level and the visual size separately. Then style the existing H2–H6 tags to match your design system, so the correct level also looks correct by default.
.text-xl { font-size: 1.5rem; font-weight: 700; }
.text-lg { font-size: 1.25rem; font-weight: 600; }
.text-sm-heading { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
/* Usage: semantic H3, visually small */
/* <h3 class="text-sm-heading">Starter plan</h3> */Re-level headings inside page content
Open each flagged page in your editor and walk through the body headings from top to bottom. Use these rules:
- The page title is the H1, and it is usually set by the template.
- Main sections are H2.
- Subsections of an H2 are H3, subsections of an H3 are H4, and so on.
If an H3 has no H2 above it, either promote it to H2 or add the missing H2 section title. Do not use headings for callouts, bold intros or button labels. Use bold paragraph text for those instead.
<h1>Pricing Guide</h1>
<h2>Plans</h2>
<h3>Starter plan</h3>
<h3>Business plan</h3>
<h4>Add-ons</h4>
<h2>FAQ</h2>
<h3>Can I cancel anytime?</h3>Stop new skips from being published
Add a guardrail so the problem does not come back:
- Editor rules: remove H5 and H6 from the editor's heading dropdown if your content never needs them.
- Author checklist: add "headings go H2 → H3 → H4, no jumps" to the editorial checklist.
- Automated checks: on custom builds, add an automated accessibility check such as axe-core's heading-order rule to CI.
// Playwright + @axe-core/playwright
const results = await new AxeBuilder({ page })
.withRules(['heading-order'])
.analyze();
expect(results.violations).toEqual([]);Re-check the flagged pages and re-run the audit
Clear any page cache or CDN cache, then reload each flagged URL and run the console snippet from step 1 again. No line should show the SKIPPED marker. Then re-run the site audit. Because the check scores the share of pages with skips across the whole site, template fixes should cut the flagged count sharply in one pass.
Platform-specific notes
WordPress
**Block editor content:** select the Heading block and use the H2–H6 dropdown in the block toolbar to change its level. **Block themes:** widget and footer headings live in template parts. Go to Appearance > Editor > Patterns > Template Parts > Footer and change each Heading block's level there. **Classic themes:** the widget title tag is set in functions.php. Edit the register_sidebar() call: 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>'. Make this edit in a child theme so updates do not overwrite it. **Page builders:** Elementor and similar builders set the tag per widget under Content > HTML Tag.
Shopify
**Theme code:** go to Online Store > Themes > ... > Edit code and look in sections/footer.liquid, sections/main-article.liquid and snippets such as card-product.liquid. Hard-coded headings like <h3 class="footer-block__heading"> often need to become h2. **Theme editor:** some 2.0 themes expose a heading-tag setting in the theme editor. Check the section settings before editing code. **Product and blog descriptions:** use the rich text editor's format menu to set Heading 2–6. The descriptions sit under an H1 product or article title.
Wix
Text theme names such as "Heading 4" control both the look and the default tag. To change only the HTML tag, select the text box, click the Settings (cog) icon, open **SEO & Accessibility** and choose the HTML tag (H1–H6 or P). Apply the same change to footer text in the site-wide footer.
Webflow
Select the heading element and change its level with the H1–H6 buttons in the element settings panel. Keep the class, so the styling stays intact. In Rich Text fields and CMS collections, fix the levels in the content itself. Check the Navigator panel for headings inside Symbols or Components, because one fix there updates every page.
Next.js / React
Hard-coded <h3> tags inside reusable components (cards, accordions, footers) are the usual cause. Add a prop, for example <Card headingLevel={3} />, and render the tag from it with const Tag = `h${headingLevel}`. Each page can then pass the correct level for its context.
Check that it worked
✅ How to verify
- Run the console snippet from step 1 on each previously flagged URL and confirm no heading is marked SKIPPED.
- Use the HeadingsMap extension or Chrome DevTools > Lighthouse > Accessibility and confirm "Heading elements are not in a sequentially-descending order" no longer appears.
- Check the raw HTML with View Source or curl -s https://example.com/page | grep -oE '<h[1-6]' to confirm the server-delivered markup is fixed, not just the live DOM.
- Re-run the site audit and confirm the number of pages failing the heading hierarchy check has dropped.
⚠️ Common mistakes
- Fixing headings page by page when the skip comes from a shared footer, sidebar or card component that appears on every page.
- Downgrading every heading to H2 to avoid skips, which flattens the outline and hides real subsection structure.
- Changing a heading's tag without keeping its CSS class, so the design breaks and someone reverts the fix.
- Forgetting hidden headings in mobile menus, cart drawers, cookie banners and modals, which still exist in the HTML the audit reads.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
Does skipping heading levels hurt SEO?
Not directly in a big way. Google has said heading order is not a strong ranking signal. Skips do make your page structure less clear to search engines and AI tools that pull answers from specific sections. They are also a common accessibility failure, so fixing them is worth the effort.
Is it OK to go from H4 back to H2?
Yes. Moving back up a level simply closes the current subsection and starts a new main section. Only jumps downward, such as H2 to H4 or H1 to H3, count as skipped levels.
Can a page have more than one H2 or H3?
Yes. Use as many H2s as you have main sections and as many H3s under each H2 as you have subsections. The rule is about nesting order, not about how many of each level you use.
Should footer and sidebar titles be headings at all?
They can be. Screen reader users sometimes jump to them, so H2 is a reasonable choice for footer column titles. If a title is just a label, a styled p or div is also fine. Either way, do not use H4 or H5 just because the text is small.