Heading Tags (h1–h6)

Heading tags, from <h1> to <h6>, define section titles in order of importance, with <h1> being the most important and <h6> the least. They give a page a clear, hierarchical structure.

Web

There should usually be one <h1> per page describing its main topic, with <h2> for sub-sections and so on. Headings should follow a logical order without skipping levels.

Screen readers and search engines rely on heading structure to understand and navigate a page, so use headings for meaning, not just to make text bigger.

Examples

HTML

<h1>Recipes</h1>
<h2>Breakfast</h2>
<h3>Pancakes</h3>

Output:

Renders three headings of decreasing size, showing a title and two nested sub-sections.

Learn it in a lesson

See also

Back to the Dictionary