HTML Headings — h1 to h6
HTML has 6 heading levels. They create a hierarchy of content like a newspaper: big headline, section titles, and sub-titles. Google uses headings heavily to understand your page and rank it in search.
All 6 Sizes in Action
<h1>CIWeb — Learn HTML Free</h1> <!-- Page title --> <h2>HTML Course</h2> <!-- Major section --> <h3>Lesson 3: Headings</h3> <!-- Sub-section --> <h4>Level 4 Heading</h4> <!-- Rarely used --> <h5>Level 5 Heading</h5> <!-- Very rare --> <h6>Level 6 Heading</h6> <!-- Smallest -->
CIWeb — Learn HTML Free
HTML Course
Lesson 3: Headings
Level 4 Heading
Level 5 Heading
Level 6 Heading
Blog Post Heading Structure
<article> <h1>Python vs JavaScript in 2026</h1> <p>Both are great. Let me compare them...</p> <h2>Python Advantages</h2> <h3>Easy to Read</h3> <p>Python code reads like English...</p> <h3>Great for AI</h3> <p>TensorFlow, Pandas, NumPy...</p> <h2>JavaScript Advantages</h2> <h3>Runs in Browser</h3> <p>Only language browsers understand natively...</p> </article>
Both are great. Let me compare them...
Great for AI — TensorFlow, Pandas, NumPy...
The words in your h1 are the strongest ranking signal on the page. A page with "Learn HTML Free" in its h1 will rank better for that search than a page without it. Followed by h2, then h3.
Tim Berners-Lee chose 6 heading levels in 1991 based on printed document hierarchy. Academic papers rarely go beyond 4-5 levels, so 6 was considered more than enough for any document.