Heading Hierarchy
HTML defines six heading levels — <h1> through <h6>. Use them to outline your page, not just to set sizes. One <h1> per page, then nest logically.
h1 — Page Title (one per page)
Represents the top-level heading for the entire document. There should be exactly one.
h2 — Major Sections
Break the page into main topical sections. These show up in screen reader landmark navigation.
h3 — Sub-sections
Within each h2, group related paragraphs under h3 headings.
h4 — Fine-grained Topics
Use when you need another layer inside an h3 block — rare on most pages.
h5 — Captions and Side Notes
Smaller headings for caption-like text such as figure titles or callout headers.
h6 — Lowest Level
The smallest heading. Good for bylines, footnotes, and any remaining nesting.
Do / Don't
| ✅ Do | ❌ Don't |
|---|---|
| Nest consecutively (h1 → h2 → h3) | Skip levels (h1 → h3) |
| One h1 per page | Multiple h1s |
| Use for document structure | Use just to make text big |
| Match the visual weight to importance | Style headings in the middle of the hierarchy to look like h1 |
If you need a visually large subtitle, use <p class="lede"> or <hgroup> with the real heading underneath. Headings exist for accessibility and document outline, not just typography.