Sub topic 2
Using size contrast to rank information
Prerequisites
This chapter assumes you know the basic vocabulary of type (typeface, font size, weight, italic). It also assumes you can read simple CSS, since the examples use it. If you work in a design tool instead, the same ratios apply to your text styles.
What size contrast does
Size contrast is the difference in font size between two levels of text. A reader looks at a page and, within a second or two, decides what to read first, what to skim, and what to skip. Size is the strongest cue for that decision. Larger text reads as more important. Smaller text reads as supporting detail.
Size contrast works because the eye compares. A 24px line means little alone. Next to 16px body text, it reads as a heading. The ranking comes from the relationship between sizes, not from any single value.
Weight, color, and spacing also signal rank. They work best as support for size. Later chapters cover them. Here the goal is to pick sizes that make each level distinct and to avoid the common ways size contrast fails.
Rank first, then choose sizes
Before you choose any numbers, list the levels your layout needs and put them in order. A typical article has these:
- Headline: the main idea of the page.
- Subhead: the start of each section.
- Body text: the detail.
- Small text: captions, notes, and legal lines.
Each level gets one size, and the order of sizes must match the order of importance. Two levels that share a size can only be told apart by other cues, so they read as the same rank. A layout with five or six levels is hard to read as a ranking, so most pages use three or four distinct sizes.
How large should the gap be?
The gap between levels has to be large enough to see at a glance and small enough to look like one design. Compare these three pairs of body and subhead sizes.
| Body size | Subhead size | Ratio | Effect |
|---|---|---|---|
| 16px | 17px | 1.06 | Too close. The subhead looks like a mistake. |
| 16px | 20px | 1.25 | Clear but calm. Works for most content. |
| 16px | 32px | 2.00 | Strong. Suits a headline more than a subhead. |
A ratio below about 1.2 between adjacent levels tends to look accidental. Readers cannot tell whether the difference is intended. A ratio above about 1.5 between a subhead and body text makes the subhead compete with the headline. These figures are rules of thumb, not laws. Test them with your own typeface, because a font with a large x-height (the height of lowercase letters) looks bigger at the same size than one with a small x-height.
Use the body size as the anchor
Choose body size first, because readers spend most of their time there. Everything else is expressed relative to it. For screen reading, 16px (1rem in most browsers) is a sound minimum. Smaller body text strains readers, especially on phones. Long-form reading often does better at 18px or slightly more.
Using rem units ties every other size to the root size. If the user raises their browser's default font size for accessibility, the whole hierarchy scales together and the ratios survive. Fixed pixel sizes break this.
Here is a small hierarchy with sizes defined as variables and applied by element.
: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); }Each step is the previous one multiplied by 1.25. The next chapter covers how to derive such a scale. For now, notice what the code does. Body text sits at the base. Each heading level takes a fixed step up. Because the steps are multiplied, the levels stay visibly distinct from one another. This example skips --step-3 on purpose. You do not have to use every step. Skipping one widens the gap between h2 and h1, which gives the headline extra emphasis.
Worked example: ranking a news page
Suppose a page has a headline, a lead sentence, section subheads, body paragraphs, and photo captions. Rank them and assign sizes:
- Headline:
--step-4, about 39px. - Lead sentence:
--step-1, 20px. It is a little larger than body text and marks the entry into the article. - Subhead:
--step-2, 25px. - Body:
--step-0, 16px. - Caption: 0.875rem, 14px.
The headline is the largest and the caption the smallest, so the order of sizes matches the order of importance. The lead sentence is a special case. It is not a heading, but its slightly larger size tells the reader it comes before the body. Notice that the lead (20px) is smaller than the subhead (25px), which keeps it from competing with section structure.
Common failure modes
Too many sizes
When a page uses eight or nine sizes, no single size stands out. Readers cannot learn the system. Fix this by merging near-duplicate sizes. If two sizes differ by less than the smallest step in your scale, they should be one size.
Sizes that are too close
This is the most common error. A 16px body with a 17px or 18px subhead produces a weak hierarchy. Designers often fall back on bold or color to compensate. That can work, but a clear size step does the job with less visual noise.
Everything large
Large text only signals importance when other text is smaller. If you enlarge every element to make it "stand out," the contrast disappears. Rank is relative. To make something matter more, make something else matter less, or give it a bigger step.
Headline overpowers the page
An oversized headline can push the content below the fold on a phone. A very large size also creates a gap so wide that the headline feels disconnected from the text. Keep the headline within about 2 to 3 times the body size for typical articles. Marketing hero sections can go higher, but then check how they behave on small screens.
Size without semantics
Sizing a <p> with large text so that it looks like a heading gives sighted readers the right look. It gives screen reader users no structure. Use real heading elements and style them with CSS.
<article>
<h1>Headline states the main idea</h1>
<p class="lead">A short intro sentence in slightly larger text.</p>
<h2>Subhead introduces a section</h2>
<p>Body text carries the detail.</p>
</article>The h1 and h2 elements express the order in the markup. Assistive technology can then jump between headings. The lead class handles the one case that is a visual choice, not a structural one.
Checking your contrast
You can test size contrast without any tools. Step back from the screen, or blur your eyes, until you cannot read the words. You should still see distinct layers: one dominant block, a few medium blocks, and a gray field of body text. If two layers merge, their sizes are too close. The final chapter covers this squint test in detail.
You can also check the ratios with arithmetic. Divide each level's size by the one below it. If any ratio between neighboring levels falls under about 1.2, look at that pair again.
Summary of working rules
- Rank the levels before choosing sizes, and give each level one size.
- Start from a body size of at least 1rem and express other sizes relative to it.
- Keep neighboring levels at least about 1.2 times apart.
- Use three or four distinct sizes in most layouts.
- Mark structure with real heading elements, and use CSS for the look.
Exercise
A page uses 16px body text, an 18px h2, and a 20px h1. The designer says the hierarchy looks weak, and proposes making all three bold. What is the better fix, and what ratios support it?
Show answer
Increase the size gaps instead of adding bold. The body-to-h2 ratio is 18/16 = 1.125 and the h2-to-h1 ratio is 20/18 = 1.11, both below the roughly 1.2 minimum, so the levels look nearly identical. Moving to a 1.25-ratio scale gives about 16px body, 25px h2, and 39px h1. Those gaps are clearly visible without extra weight.
Exercise
A layout has a 1rem body, a 1.1rem subhead, a 1.2rem lead, a 1.4rem pull quote, a 1.5rem h3, and a 1.6rem h2. Name the problem and describe one way to correct it.
Show answer
The layout has six sizes packed into a narrow range, so no level stands out and the ratios between neighbors are about 1.05 to 1.1. Merge them into three or four levels with steps of about 1.25 or more, for example 1rem body, 1.25rem for lead and h3, 1.563rem for h2, and the pull quote matched to one of those existing sizes.