Fix Heading Hierarchy and Structure
Learn how to use proper heading hierarchy (H1-H6) for accessibility and SEO. Includes code examples and best practices.
What Is It?
Heading hierarchy is the nested structure of h1, h2, h3, etc. tags. Proper structure: H1 (page title) -> H2 (section headings) -> H3 (subsection headings), etc. Don't skip levels.
Affected users: Screen reader users, users with cognitive disabilities, users with attention disorders, search engines, users scanning pages
Why It Matters
Screen reader users use heading navigation to understand page structure and jump between sections. Search engines use heading hierarchy to understand content importance. Poor heading structure confuses both.
How to Detect This Issue
Test with screen reader heading list. Check if headings follow logical order (no skipping H2 to H4). Verify H1 exists and is unique per page. Use automated heading checker tools.
Code Examples & Fixes
HTML / CSS
<h1>Product Page</h1>\n<h3>Features</h3>\n<h1>Customer Reviews</h1><h1>Red Leather Wallet</h1>\n<h2>Features</h2>\n<h3>Durability</h3>\n<h3>Design</h3>\n<h2>Customer Reviews</h2>Proper hierarchy: one H1 per page, followed by H2 sections, H3 subsections. Don't skip levels. Organize from most important to least important.
React / Next.js
<div className="heading">Section Title</div><h2>Section Title</h2>Use semantic heading elements, not styled divs. Screen readers don't understand <div> as heading. Style <h2> with CSS instead.
WordPress
Title set as text in page builder, sections as bold text, no heading tagsPage title set as H1 (via page editor), section titles as H2 (via text block heading), subsections as H3WordPress: use Paragraph block with Heading style selector. Default page title is H1. Ensure heading hierarchy in page content.
Shopify Liquid
Product name in <span> with CSS styling, sections using <b> or <strong> tagsProduct name in <h1>, section titles in <h2>, using semantic heading tags in liquid templateShopify liquid: use heading tags in sections. Edit section HTML to replace styled divs with proper <h1>, <h2>, <h3> elements.
Common Mistakes
Skipping heading levels (H1 -> H3 skips H2)
Multiple H1 tags on same page (should be exactly one)
Using headings for styling rather than structure (H3 used because it looks good, not because it's a subsection)
Headings that don't describe content (e.g., <h2>Learn More</h2> tells you nothing about the section)
Heading structure doesn't match visual structure (confuses users)
Frequently Asked Questions
How many H1 tags should a page have?
Should I use heading tags for styling?
What if my design requires headings in a certain visual size?
Is heading structure important for SEO?
Check your website for free
Get your ADA, WCAG, privacy & security score in 90 seconds.