Home / Learn HTML / HTML Headings

HTML Headings

Headings give a page its outline. There are six levels, from h1 (most important) to h6.

Definition

Headings are the titles of your content. HTML has six levels, h1 (most important) to h6 (least important). Browsers make h1 the largest, but the level is about importance and outline, not about size.

Search engines read headings to understand what the page is about, and screen reader users jump from heading to heading to scan the page, like reading the table of contents of a book.

Theory in plain words

A good outlineh1 Page title (only one)h2 Sectionh3 Subsectionh2 Next section
A good outline

What it is

Headings are six levels of titles, h1 for the main title down to h6.

Why we use it

They give the page an outline. Screen reader users jump from heading to heading, and search engines use them to understand topics.

How it works

The browser draws h1 largest by default. The order of levels matters, not their size, so use CSS for size.

Where it is used

  • Page and section titles
  • Blog posts and documentation
  • Landing page sections
All six levelsTry it Yourself
A page outlineTry it Yourself

Think of headings like chapters and sub chapters in a book.

Style a headingTry it Yourself
Heading with a line under itTry it Yourself
Make h1 smallTry it Yourself

Size comes from CSS. Choose the level by meaning, not by size.

Heading with a linkTry it Yourself
Heading with a spanTry it Yourself
Heading in an articleTry it Yourself
Horizontal rule between sectionsTry it Yourself

Rules to follow

Page title and taglineTry it Yourself

Quick quiz

1. How many h1 should a page have?

2. h6 is the

3. Should you use h1 only to make text big?

Common questions

How many h1 should a page have?

One. One main title per page.

Should you use h1 only to make text big?

No, use CSS. Headings give meaning, CSS gives size.

My notes
Ask a question about this lesson