HTML5
HTML5

HTML Headings

Headings are the titles of your content. HTML gives you six heading levels: <h1> through <h6>. <h1> is the main heading. <h2> is a section heading under it. <h3> can be a smaller heading inside that section, and the pattern continues to <h6>. Think about a school book. The book title is like <h1>. A chapter is like <h2>. A smaller topic inside the chapter can be <h3>. Choose headings because of their meaning and place in the document, not because you want a certain font size. CSS can change the visual size later.

Why this matters

  • ·Headings make pages easy to scan.
  • ·They create a logical content outline.
  • ·Screen readers can use headings to move around a page.

Common mistakes

  • ·Using headings only because they look big creates a confusing outline.
  • ·Skipping levels without a good reason can make the structure harder to follow.
  • ·Using many <h1> elements can make the main topic unclear in a simple page.
Your codeHTML
Live preview

Frequently asked questions

Six, from <h1> to <h6>.

Practice questions

Question 1

Create an h1, two h2 headings, and one h3 under the first h2 inside a body.

Your codeHTML
Live preview

Question 2

Make a page outline for a small blog post.

Your codeHTML
Live preview

Quick check

Just for this topic answer honestly, then check yourself.

1 / 3

Which tag is the main heading?