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-07

Heading tags (H1–H6) are HTML elements that define the hierarchical structure of page content. Search engines use them to understand page topics and organization, with H1 being the most important heading indicating the page's main subject.

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.

今井政和

Written by

今井政和

SEO Director / Frontend Developer

SEO Director with 20+ years of web industry experience. Creator of SEO_CHECK and the official WordPress plugin "ORECTIC SEO CHECK." Author of a book on web strategy inspired by Edo-era merchant principles.

@imai_director

FAQ

Berapa banyak tag H1 yang sebaiknya ada di satu halaman?
Direkomendasikan untuk memiliki tepat satu tag H1 per halaman. Meskipun HTML5 secara teknis mengizinkan beberapa tag H1, Google merekomendasikan satu H1 untuk mengomunikasikan topik utama halaman dengan jelas. Beberapa tag H1 dapat mempersulit mesin pencari dalam menentukan subjek utama, yang berpotensi mengurangi efektivitas SEO.
Apa perbedaan antara H1 dan title tag?
Title tag muncul di tab browser dan hasil pencarian, serta ditempatkan di HTML <head>. Tag H1 adalah heading utama yang terlihat di badan halaman, ditempatkan di <body>. Title tag secara langsung memengaruhi click-through rate di hasil pencarian, sedangkan H1 mengomunikasikan struktur konten di dalam halaman. Keduanya bisa sama atau berbeda, tetapi harus menyampaikan topik halaman yang konsisten.
Bolehkah melewati level heading? (misalnya H2 diikuti H4)
Melewati level heading sebaiknya dihindari. Ikuti urutan yang benar: H2, kemudian H3, kemudian H4. Melewati level mempersulit pengguna screen reader untuk memahami struktur konten, sehingga menimbulkan masalah aksesibilitas. Dari perspektif SEO, Google menggunakan hierarki heading untuk memahami struktur logis konten, sehingga menjaga urutan yang tepat sangat penting.
Haruskah saya menyertakan kata kunci di heading tag?
Ya, direkomendasikan untuk menyertakan kata kunci target secara alami di heading tag Anda. Namun, keyword stuffing bersifat kontraproduktif — mesin pencari mungkin menandainya sebagai spam. Idealnya, sertakan kata kunci utama Anda satu atau dua kali dengan cara yang terbaca natural bagi pengguna.
Apakah styling CSS pada heading tag memengaruhi SEO?
Tidak, styling CSS pada heading tag (mengubah ukuran font, warna, tebal, dll.) tidak memengaruhi SEO. Mesin pencari melihat struktur tag HTML, bukan gaya visual. Namun, penggunaan heading tag semata-mata untuk tujuan desain (misalnya menggunakan H2 hanya untuk membuat teks lebih besar) tidak direkomendasikan. Gunakan heading tag untuk struktur konten dan CSS untuk styling visual.