Hierarchy and Scale
Typography Fundamentals
Course 1 · Chapter 4 · Hierarchy and Scale
In Typography Fundamentals 3 you learned the four dials that make a single paragraph comfortable: size, measure, leading and tracking. A real page is never one paragraph, though. It has a title, section headings, captions, lists and notes, and the reader needs to know at a glance which is which. That job is called typographic hierarchy: using visible differences to show which text is most important, which belongs to which, and in what order to read it. This chapter shows how to build a hierarchy deliberately, using a modular scale to choose sizes and four kinds of contrast to separate the levels.
What a Hierarchy Is For
Imagine a page where every line is 16px regular text with the same gap between lines. Nothing tells you where to start, what is a heading and what is a footnote. You are forced to read it all to find out. Now imagine a menu, a timetable or a newspaper: you glance, find the big thing, then the next biggest, and decide where to dive in. A hierarchy is that glance made possible. A good one answers three questions without the reader noticing they were asked:
- What is this page about? The title is the loudest thing.
- How is it organised? Headings and subheads show the sections and their parts.
- What is secondary? Captions, notes and metadata are visibly quieter than the main text.
Here is the same content set twice. Cover the right-hand sample and try to answer the three questions from the left one:
Harbour Bread Club
Meet on the first Saturday of the month
What we bake
Sourdough, rye and a seasonal loaf. Bring a starter if you have one.
Photo: last month's table
Harbour Bread Club
Meet on the first Saturday of the month
What we bake
Sourdough, rye and a seasonal loaf. Bring a starter if you have one.
Photo: last month's table
The right-hand sample uses no new typeface and no decoration. It simply made the title big and bold, pushed the tagline back with a softer colour, gave the section heading its own size and a gap above it, and shrank the caption. That is hierarchy.
The Four Tools of Contrast
To make one level stand apart from its neighbour, you vary something. There are four main things to vary, and a good designer picks one or two per level rather than all four at once.
| Tool | How it signals rank | CSS you would touch | Watch out for |
|---|---|---|---|
| Size | Bigger reads as more important | font-size | Neighbouring levels only 1 to 2px apart look like a mistake, not a choice |
| Weight | Bolder reads as more important or as a label | font-weight | Bold everywhere stops meaning anything; remember the weights from Typography Fundamentals 2 |
| Colour and tone | Stronger tone leads; softer tone recedes | color | Grey text can become too faint to read: contrast is measured in Typography Fundamentals 7 |
| Space | Space around text isolates it and groups what is near | margin, padding, line-height | Equal space above and below a heading leaves it floating |
A fifth tool exists, style (italic, small capitals, all-caps with tracking, as you saw in Typography Fundamentals 3), and a sixth, position (top of the page, left of the column). They are useful, but size, weight, colour and space do most of the work.
Proximity: Space That Groups
Our eyes treat things that sit close together as related. This is called proximity, and it is why the gap above a heading should be larger than the gap below it. Compare the two headings below. In the first the gaps are equal; in the second the heading is pulled towards its own paragraph:
The oven should be hot before the loaf goes in, and the steam tray filled.
Scoring the loaf
A single curved cut lets the bread expand where you choose.
The oven should be hot before the loaf goes in, and the steam tray filled.
Scoring the loaf
A single curved cut lets the bread expand where you choose.
A handy rule of thumb is a gap above a heading of about 1.5 to 3 times the gap below it (check), but trust your eye over the number.
The Levels of a Page
Most pages need only four to six levels. Giving each a name and a job keeps the design honest:
| Level | Job | HTML | Typical treatment |
|---|---|---|---|
| Title | Names the page; only one per page | h1 | Largest, bold, tight leading |
| Lead or standfirst | One or two sentences that summarise | p with a class | A step above body, softer tone |
| Heading | Opens a main section | h2 | Clearly bigger than body, bold, large gap above |
| Subhead | Splits a section into parts | h3 | Smaller than a heading; often only bold at body size, or a little larger |
| Body | The main reading text | p, li | The baseline against which everything else is judged |
| Caption or note | Describes a figure or adds a side remark | figcaption, small | Smaller and quieter than body |
h1 to h3 because of a heading's place in the outline, so screen readers and search engines understand the page, not because you like the default size. Never skip from h1 straight to h4 just to get a smaller heading: change the size in CSS instead.
Modular Scales: Picking Sizes by Ratio
How big should a heading be? "A bit bigger" is vague, and ad-hoc numbers (22px here, 27px there) tend to produce sizes that do not feel related. A modular scale removes the guesswork. You choose a base size (usually the body text, say 16px) and a ratio, then every other size is the base multiplied by the ratio a number of times. Going up is multiplying, going down is dividing:
This is borrowed from music, where each note on a scale stands in a fixed ratio to the next (check), which is why the ratios carry musical names. The reason it works is the same: sizes that share a ratio feel like they belong to one family. Some common ratios:
| Ratio | Name | Character |
|---|---|---|
| 1.125 | Major second | Subtle: good for dense interfaces and long documents |
| 1.2 | Minor third | Gentle and flexible: a safe default for articles |
| 1.25 | Major third | Clear steps without shouting: a popular default |
| 1.333 | Perfect fourth | Bold: good for marketing pages and posters |
| 1.5 | Perfect fifth | Dramatic: few levels, big contrast |
| 1.618 | Golden ratio | Very steep: sizes explode after a few steps |
Rather than trust the table, let us compute. This script prints the sizes five different ratios produce from a 16px base, then turns the minor-third scale into rem values for named roles.
Read down the columns. The major second grows gently: even step 6 is only 32.4px, which is why it suits long documents. The golden ratio reaches 109.7px at step 4 and 287.1px at step 6, far too large for a normal page, while its step -2 is a useless 6.1px. The lesson is that a bigger ratio gives you fewer usable steps. For most text-heavy pages, a ratio between 1.125 and 1.333 and only four to six steps is plenty (check).
Notice also that the small side of the scale shrinks quickly: with the perfect fourth, step -2 is 9.0px, below a comfortable reading size. A scale does not have to be used in both directions. Many designs use the base for body text and only one step down for captions.
Putting a Scale into CSS
Custom properties (CSS variables) are the natural home for a scale: define the sizes once, then use them by name everywhere. Changing the ratio later means editing a few lines. Sizes are in rem so they follow the reader's browser setting (Typography Fundamentals 3).
Notice how this stylesheet uses all four tools: size from the scale, a tighter line-height as the text grows (Typography Fundamentals 3), colour on the lead and caption, and margins that are larger above a heading than below it.
Auditing a Hierarchy
You can check a hierarchy by looking, and you should. But a quick script catches the commonest fault, levels that are too close to tell apart. This audit takes a list of levels with size and weight, computes the size ratio between each level and the next, and flags pairs that are too close in size and not rescued by a big difference in weight. The 1.15 threshold is a rule of thumb, not a law (check).
The audit says the title and the headings are nearly the same size and the same weight: the page would read as a pile of similar-looking headings. The h3 is saved by being bold against regular body text, but the body and caption are only 1px apart with the same weight, so a caption would look like a typing slip, not a different level. The cure is a scale: moving this page to a 1.25 ratio would put the title at about 39px, the headings at about 31px and the subheads at 25px, and the audit would pass them all.
Building a Readable Page Structure
Here is a short recipe for putting it all together, in the order a designer would work:
- Start with the body. Choose its typeface, size, measure and leading (Typography Fundamentals 3). Everything else is measured from it.
- List the levels you really need. Title, lead, heading, subhead, caption is usually enough. Fewer levels, more clearly separated, beats many levels that blur together.
- Pick a scale and assign steps to levels. Nudge by eye.
- Add weight and tone where size alone is not enough, for instance bold subheads at body size, or a softer colour for captions.
- Set the space so headings sit closer to what follows than to what precedes them.
- Squint test. Blur your eyes or shrink the page: the order should still be obvious.
| Idea in this chapter | An idea you may already know |
|---|---|
| Modular scale | Spacing tokens or a colour palette in a design system: a few related values reused everywhere |
| Hierarchy levels | The headings outline of an HTML document: h1 to h3 nested by meaning |
| Proximity | A well-grouped menu or a form with fieldsets: things near each other belong together |
| Squint test | Reading code at a glance by its indentation, not its words |
Hands-On Exercises
Three exercises: a code task that turns a scale into CSS, a written design task that gives a flat page its hierarchy, and a CSS task that builds a complete stylesheet from a scale. Each has a solution file that opens in a new tab.
Write a script that takes a base size and a ratio from the command line and prints a :root block of CSS custom properties for six named roles (caption, body, lead, h3, h2, h1) in rem, with a comment showing the pixel size beside each. Make it print a warning when the caption comes out below 12px or the h1 above 64px. Try it with 1.25 and with 1.618 and describe in a sentence what changes.
A community recipe page is set entirely in 16px regular text, one colour, with equal gaps between every line. It has a recipe title, a one-sentence intro, the headings "Ingredients" and "Method", a list of ingredients, numbered method steps, a "chef's tip" and a photo caption. On paper, design its hierarchy: for each element give a size (in rem), weight, colour tone and the space above and below it. For each level say which of the four tools (size, weight, colour, space) you chose and why, and explain how your spacing shows that "Method" belongs to the steps beneath it and not to the ingredients above it.
📄 View solutionWrite a stylesheet for a long-form article that defines its type sizes as custom properties from a modular scale (state your base and ratio in a comment). Include a small kicker label above the title, a lead paragraph, h1 to h3, body text and a figure caption. Use all four tools of contrast, with a comment on each rule saying which tool carries the rank. Give headings more space above than below, and add a media query for wide screens that changes only the root font size, with a comment explaining why that is enough.
Chapter 4 Quick Reference
- Hierarchy shows what is most important, how the page is organised and what is secondary; four to six levels is usually enough
- Four tools of contrast: size, weight, colour and tone, space; use one or two per level, not all four at once
- Proximity: more space above a heading than below it, so it groups with what follows (about 1.5 to 3 times (check))
- Modular scale: size = base × ratiostep; ratios between 1.125 and 1.333 suit most text pages (check); bigger ratios give fewer usable steps
- In CSS: store the scale in custom properties, in
rem; use a tighterline-heighton bigger text - Tags for meaning, CSS for looks: do not skip heading levels to get a smaller size
- Squint test: blur the page; the order of importance should still show