Sub topic 2
Using size contrast to rank information
This chapter assumes you know basic type vocabulary (typeface, font size, weight, italic) and can read simple CSS. It covers how differences in size rank the parts of a layout. Building a full scale from a ratio comes in a later chapter.
Size is the first signal readers use
A reader decides what to read first before reading any words. Size is the fastest cue for that decision. The largest text on a page is read first, and the smallest is read last or skipped. When you set sizes deliberately, you decide the reading order instead of leaving it to chance.
A layout usually has three ranks:
- Headline: the largest text, which states the main idea.
- Subhead: mid-sized text, which marks the start of each section.
- Body text: the smallest regular text, which carries the detail.
Body text is the baseline. You rank everything else by how far it sits above that baseline.
Contrast must be noticeable
Size contrast is the difference between two levels. A small difference looks like a mistake, not a choice. If body text is 16px and a subhead is 17px, the reader sees no rank. They see text that is slightly off.
The steps need to be clearly visible. A ratio of about 1.25 between neighboring levels is a workable minimum for web layouts. Printed posters and landing pages often use larger jumps, such as 1.5 or more.
| Level | Size (rem) | Ratio to body |
|---|---|---|
| Body | 1 | 1.00 |
| Subhead (h3) | 1.25 | 1.25 |
| Section heading (h2) | 1.563 | 1.56 |
| Headline (h1) | 2.441 | 2.44 |
A worked example
This CSS gives each level its own step above the body size. The rem unit is relative to the root font size, which is 16px in most browsers, so 1rem is 16px.
:root {
--step-0: 1rem;
--step-1: 1.25rem;
--step-2: 1.563rem;
--step-3: 1.953rem;
--step-4: 2.441rem;
}
body { font-size: var(--step-0); }
h3 { font-size: var(--step-1); }
h2 { font-size: var(--step-2); }
h1 { font-size: var(--step-4); }The code skips --step-3 on purpose. Leaving a step unused makes the jump between the section heading and the headline larger, so the headline stands out more. You can choose which steps to use. You don't have to use every one.
Common errors
- Too many sizes. Using six or seven sizes on one page blurs the ranks. Keep to three or four distinct levels.
- Steps that are too close. Levels that differ by less than about 20% read as accidental.
- Size used for emphasis inside body text. Making one sentence larger in a paragraph breaks the baseline. Use weight or italic for that. Those cues come in a later chapter.
- Everything large. Rank only exists by comparison. If every element is big, nothing stands out. Raising the headline works best when the body stays calm.
- Tiny body text. Pushing body text below about 1rem to make the headline look bigger hurts readability. Raise the headline instead.
Size works with other cues
Size ranks information, but it does not work alone. Spacing, weight, and color support it. A large headline with cramped spacing still looks crowded. Later chapters cover those cues. For now, remember that size sets the main order, and the other cues refine it.
Exercise
A page uses 16px body text and a 17px subhead. Readers say the subhead looks like a typo. What is the problem, and what is one fix?
Show answer
The size contrast is too small, so the subhead does not read as a higher rank. Increase the subhead to a clearly larger size, such as 1.25rem (20px), a 1.25 ratio to the body.
Exercise
Why does the example CSS skip --step-3 when it assigns sizes to h1, h2, and h3?
Show answer
Skipping a step makes the gap between the h2 and the h1 larger, so the headline stands out more. Not every step in a scale has to be used.