Sub topic 2
Size: Bigger Elements Are Seen First
This chapter assumes you know basic HTML (headings, paragraphs, links, buttons) and basic CSS (selectors, properties, the box model). It covers size as the first cue of visual hierarchy. The next chapter builds a consistent type scale from it.
Why size draws the eye
Readers do not read a page from the top. They first notice what takes up the most visual area, then move to smaller items. Size tells them what matters before they read a word.
The cue only works by comparison. A 24px heading looks big beside 16px body text, but looks ordinary beside a 64px banner. You are always setting a relationship between elements, not a single value.
What counts as size
Size is more than font-size. Anything that changes how much area an element occupies adds weight:
- Font size of text.
- Width and height of images, video, and cards.
- Padding, which makes a button or panel occupy more space.
- Surrounding whitespace, which makes an element feel larger by isolating it.
A small line of text with generous space around it can outrank a larger line crowded between other content.
A worked example
This card has three text levels and one button. The title is clearly largest, the summary is the reading size, and the metadata is smaller than both.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Size demo</title>
<style>
body { font-family: system-ui, sans-serif; font-size: 1rem; line-height: 1.5; }
.card { max-width: 28rem; padding: 1.5rem; }
.card__title { font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem; }
.card__summary { margin: 0 0 0.75rem; }
.card__meta { font-size: 0.875rem; margin: 0 0 1rem; }
.card__action { font: inherit; padding: 0.75rem 1.5rem; }
</style>
</head>
<body>
<article class="card">
<h1 class="card__title">Spring Workshop</h1>
<p class="card__summary">Learn to build accessible layouts in one afternoon.</p>
<p class="card__meta">Saturday, 3 hours</p>
<button class="card__action">Reserve a seat</button>
</article>
</body>
</html>The title is 2rem and the summary is 1rem, a 2:1 ratio. That is enough to read the title as the entry point. The button has no larger font, but its padding gives it a big click area, so it still ranks above the metadata.
How big is big enough
Small differences look like mistakes. If two sizes are close, such as 16px and 18px, the reader cannot tell whether the difference is intentional. A workable rule of thumb is a ratio of at least about 1.2 between neighboring levels. Between the top level and body text, aim for 1.5 to 2 or more.
Use relative units such as rem for text, so the whole hierarchy scales when a user changes their browser's default font size. Pixel values lock your ratios to one setting.
Common errors
| Error | What happens | Fix |
|---|---|---|
| Making everything large | Nothing stands out, because there is no smaller content to compare against | Keep most content at body size and enlarge only the few things that matter |
| Tiny size steps | Levels look accidental | Use a clear ratio between levels |
| Choosing heading tags for their size | Headings are skipped or misordered, which breaks document structure | Pick the tag for meaning and set size in CSS |
| Large decoration, small action | A big hero image outranks the call to action | Check which element is largest on screen and whether it should be |
| Text too small to read | Small metadata drops below usable size | Keep even the smallest text near 0.875rem or larger |
The third error deserves emphasis. An <h3> styled to look like a title is still an <h3> to a screen reader. Use heading levels to describe structure, and CSS to describe appearance.
Check your own page
- Pick one page you built and name the single element that should be seen first.
- Compare its size to its neighbors. Is the ratio visibly more than about 1.2?
- Check whether any other element is nearly as large. If so, shrink it or justify it.
- Change your browser's default font size and confirm the ratios still hold.
Exercise
A page has an h1 at 1.1rem, body text at 1rem, and a hero image filling the top half of the screen. Visitors say they do not know where to start. Give two reasons size is failing here and one fix for each.
Show answer
First, the h1 is only 1.1 times the body text, so the difference looks accidental. Fix it by raising the h1 to about 2rem or more. Second, the hero image is the largest element, so it outranks the heading and pulls attention away from it. Fix it by reducing the image height or moving it below the heading so the heading is clearly the dominant element.