0Pricing
HTML Academy · Lesson

Headings h1-h6 and Their Hierarchy

Use heading levels to create meaningful document structure.

The Six Heading Levels

HTML provides six heading elements from <h1> to <h6>:

  • h1 — Main page title (most important)
  • h2 — Major sections
  • h3 — Subsections
  • h4, h5, h6 — Deeper subsections (rarely needed)

They visually decrease in size, but size is controlled by CSS — not the number.

Semantic Hierarchy

Headings create a document outline — a table of contents for your page:

<h1>HTML Fundamentals</h1>
  <h2>Document Structure</h2>
    <h3>The html Element</h3>
    <h3>The head Element</h3>
  <h2>Text Elements</h2>
    <h3>Headings</h3>
    <h3>Paragraphs</h3>

All lessons in this course

  1. Headings h1-h6 and Their Hierarchy
  2. Paragraphs em strong and b i
  3. br hr blockquote and pre
  4. The span and div Elements
← Back to HTML Academy