SEO Guide

How to Use Heading Tags (H1-H6) Correctly

Learn how to structure heading tags for both SEO and accessibility. Covers hierarchy rules, common mistakes, and good vs. bad examples.

5 min read2026-04-25

What Are Heading Tags?

Heading tags (H1-H6) are HTML elements that create a hierarchical structure for your web content. H1 is the most important main heading, H2 marks section headings, H3 marks subsections, and so on in order of importance.

Search engines use heading tags to understand your page's content and topic structure. Screen readers also rely on headings for page navigation, making them essential for accessibility.

/* HTML heading tags */

<h1>Page main topic (one per page)</h1>
<h2>Section heading</h2>
<h3>Subsection heading</h3>
<h4>Detail topic</h4>
<h5>Supplementary topic</h5>
<h6>Finest level</h6>

Why Does Heading Structure Matter?

Proper heading structure matters from three perspectives: search engines, users, and accessibility. Google uses heading tags to understand content topics and logical structure, displaying your page for relevant search queries.

80%

Users who scan pages using headings as guides

+47%

SEO score improvement with proper heading structure

H1-H3

Heading levels most important for SEO

Heading Hierarchy Rules

Headings create a logical nested structure, like a book's table of contents. H1 is the book title, H2 is a chapter, H3 is a section, and H4 is a subsection. Below is a comparison of correct and incorrect structures.

Correct hierarchy

H1 Page title

H2 Section 1

H3 Detail 1-1

H3 Detail 1-2

H2 Section 2

H3 Detail 2-1

H4 Sub-detail 2-1-1

Incorrect hierarchy

H1 Page title

H4 Jumping to H4 NG

H2 Section

H1 Second H1 NG

H5 Skipped H3 NG

SEO-Effective Heading Writing Tips

Use only one H1 per page

Follow the hierarchy: H2, then H3, then H4

Include target keywords naturally

Write headings that make users want to read more

Keep headings concise (aim for 20-30 characters)

Headings are the first elements users see. Write headings that make readers want to read the section, not just for search engines. Focus on clearly conveying the content rather than stuffing keywords.

Common Mistakes to Avoid

Multiple H1 tags on a page

Having multiple H1 tags makes it harder for search engines to determine the page's main topic. Use a single H1, and use H2 and below for subsequent sections.

Skipping heading levels (H2 to H4)

Jumping from H2 to H4 without H3 prevents screen readers from conveying the structure correctly. It also makes the logical structure unclear for SEO purposes.

Using heading tags for design purposes

Using H2 or H3 just to make text appear larger is incorrect. Heading tags should indicate content structure — use CSS for visual styling instead.

No heading tags at all

Long-form content without headings is hard to read, and search engines cannot understand the content structure. Add appropriate headings to define clear content sections.

Good vs. Bad Examples (HTML Structure)

Good example
<h1>Complete Dog Training Guide</h1>
  <h2>When to Start Puppy Training</h2>
    <h3>Training from 3 Months Old</h3>
    <h3>First Commands to Teach</h3>
  <h2>Retraining Adult Dogs</h2>
    <h3>Dealing with Excessive Barking</h3>
    <h3>Fixing Leash Pulling Habits</h3>
Bad example
<h1>Dog Training</h1>
<h1>Puppy Training</h1>        <!-- Two H1 tags -->
  <h4>From 3 Months</h4>       <!-- Skipped H2 and H3 -->
<h2>Adult Dog Training</h2>
  <h5>Barking Solutions</h5>   <!-- Skipped H3 and H4 -->
<div style="font-size:24px">Walking Tips</div>
                               <!-- No heading tag used -->

Check Your Site's Heading Structure

Enter a URL to instantly check H1-H6 usage, hierarchy correctness, and heading presence for free. Also checks title, meta description, and structured data.

FAQ

How many H1 tags should a page have?
It is recommended to have exactly one H1 tag per page. While HTML5 technically allows multiple H1 tags, Google recommends a single H1 to clearly communicate the page's main topic. Multiple H1 tags can make it harder for search engines to determine the primary subject, potentially diluting SEO effectiveness.
What is the difference between H1 and the title tag?
The title tag appears in browser tabs and search results, and is placed in the HTML <head>. The H1 tag is the visible main heading in the page body, placed in the <body>. The title tag directly affects click-through rates in search results, while the H1 communicates the content structure within the page. They can be the same or different, but should convey a consistent page topic.
Is it okay to skip heading levels? (e.g., H2 followed by H4)
Skipping heading levels should be avoided. Follow the proper order: H2, then H3, then H4. Skipping levels makes it difficult for screen reader users to understand the content structure, causing accessibility issues. From an SEO perspective, Google uses heading hierarchy to understand the logical structure of content, so maintaining proper order is important.
Should I include keywords in heading tags?
Yes, it is recommended to naturally include target keywords in your heading tags. However, keyword stuffing is counterproductive — search engines may flag it as spam. Ideally, include your primary keywords once or twice in a way that reads naturally to users.
Does CSS styling of heading tags affect SEO?
No, CSS styling of heading tags (changing font size, color, weight, etc.) does not affect SEO. Search engines look at the HTML tag structure, not visual styles. However, using heading tags purely for design purposes (e.g., using H2 just to make text bigger) is not recommended. Use heading tags for content structure and CSS for visual styling.