HTML Essentials

Headings

Organize content with a meaningful heading hierarchy.

Headings introduce sections. Levels run from h1 for the page topic through h6 for deeply nested sections.

Important definitions

Heading hierarchy
The ordered levels that describe page sections.

Syntax

Use this general pattern as a reference:

HTML
<h1>Page topic</h1>

Examples

Section heading

EXAMPLE 1
<h2>Account settings</h2>
ResultAccount settings
Try it yourself

Expected output

A main heading followed by a subsection heading.

Note

Heading level describes structure, not font size.

Tip

Keep one clear page topic and avoid skipping levels.

Common mistakes

  • Choosing headings only because of their size.
  • Using bold text instead of a heading.