liveBook · Manning

Heading

As explained in Design for Developers

A heading element is a semantic HTML element that marks a section heading and communicates its structural importance.

A heading is a semantic HTML element that marks a section and communicates its structural importance. The hierarchy runs from <h1>, the most prominent heading, through <h6>, the least prominent. Browsers provide default heading sizes, but a deliberate type ramp keeps similar pages consistent and helps users understand how content is organized. section 8.2.3

Use headings as both structural markers and visual elements:

  • Choose heading levels for their semantic role rather than their appearance; do not use an <h6> element to style ordinary paragraph text. section 8.2.3
  • Map a practical type ramp to H1, H2, H3, and body text, then pair HTML elements with CSS classes when visual styling needs to vary. section 8.2.3
  • Balance heading size, line height, and margins so sections are clearly separated while related subtitles remain visually connected. section 10.5

A compact heading ramp

A sample ramp uses H1 at 48px, H2 at 36px, H3 at 28px, and body copy at 16px. Its line heights are 48px, 36px, 35px, and 20px; top margins are 60px, 48px, 25px, and 16px. These values create stronger separation before new sections and tighter spacing within a section. section 10.5

Table 10.3 Vertical rhythm (view table figure)

Type

Font size

Line height

Font-size × line-height value

Top margin

H1

48px

1

48px × 1 = 48

60px

H2

36px

1

36px × 1 = 36

48px

H3

28px

1.25

28px × 1.25 = 35

25px

P

16px

1.25

16px × 1.25 = 20

16px

Compare heading sizes, line heights, and top margins in a complete vertical-rhythm table. section 10.5

How Design for Developers covers it

How deep it goes
Explains semantic levels, CSS pairing, and a worked type ramp with line-height and margin calculations.
Examples
Uses H1-H3 and paragraph sizes of 48px, 36px, 28px, and 16px with calculated line heights and margins.
What it assumes
Builds from basic HTML elements, browser defaults, CSS classes, and the distinction between headings and paragraphs.
What you can do after
Apply it via HTML and CSS by selecting semantic levels and tuning size, line height, and spacing.
How it connects
Connects headings to semantic HTML, screen readers, typography, type ramps, CSS, line height, and vertical rhythm.

Also explained in

Compare how 5 books explain heading →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Design for Developers. The section links point to the parts of the book it draws on.