liveBook · Manning

Heading

As explained in Web Design Playground, Second Edition

An HTML heading element is an element from h1 through h6 that marks heading text and indicates its level in a page hierarchy.

An HTML heading names or briefly describes a section of content. Heading elements run from <h1>, the highest level, through <h6>, the lowest. Unlike the <title> element, a main heading appears on the page rather than only in the browser tab. section 2.14

Build a page outline by matching heading levels to the content hierarchy:

  • <h1> usually identifies the page’s main heading. section 2.14
  • <h2> introduces sections, while <h3> introduces subsections beneath them. section 2.14
  • <h4> through <h6> provide progressively lower levels when the outline needs them. section 2.14
  • Browsers display each heading as its own block, using bold text and progressively smaller default sizes. section 2.14

A six-level heading outline

<h1>Level 1 Heading</h1> <h2>Level 2 Heading</h2> <h3>Level 3 Heading</h3> <h4>Level 4 Heading</h4> <h5>Level 5 Heading</h5> <h6>Level 6 Heading</h6> section 2.14

<h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<h3>Level 3 Heading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>

Preview the six heading elements and compare their hierarchy and browser-rendered sizes. section 2.14

How Web Design Playground, Second Edition covers it

How deep it goes
Defines six heading levels, explains their hierarchy and default rendering, and stops short of advanced semantic page divisions.
Examples
Shows a six-level HTML listing, browser-rendered heading sizes, and a main heading for a sample page.
What you can do after
Build it from scratch by adding hierarchical headings that make a web page easier to read and navigate.
How it connects
Connects headings with HTML elements, page hierarchy, semantic page divisions, and CSS styling.

Also explained in

Compare how 5 books explain heading →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.