Sub topic 9
Combining Size, Contrast, and Position Without Competing Emphasis
This chapter assumes you have read the earlier chapters on size, contrast, position, and spacing. It also assumes you can write basic HTML and CSS, including custom properties. Here you will use those cues together on one page.
Why emphasis competes
Each cue works well alone. A large heading draws the eye, so does a bright button, and so does an element at the top left. Problems start when several elements each use a strong cue. The reader then has no clear first stop, and the page feels noisy.
Emphasis is relative. An element stands out only because its neighbors are quieter. If you make everything bold, large, or colorful, nothing stands out.
Rank elements before styling them
Decide the order of importance first, then assign cues to match. For each view, pick:
- One primary element, such as the main heading or the main call to action.
- One or two secondary elements, such as a subheading or an alternative action.
- Everything else as supporting content, styled quietly.
A useful rule is to give the primary element at least two strong cues. Give secondary elements one cue, and give supporting content none. For example, the primary button gets a filled background (contrast) and bold text (weight). It sits in a prominent spot and has generous space around it. The secondary button gets only an outline.
Worked example: a hero section
This markup has a heading, a short paragraph, two actions, and a minor link. Only the heading and the first button should stand out.
<section class="hero">
<h1>Plan your week in minutes</h1>
<p class="lead">Drag tasks onto a calendar and see your week at a glance.</p>
<div class="actions">
<a class="button button--primary" href="/signup">Start free</a>
<a class="button button--secondary" href="/tour">Take a tour</a>
</div>
<a class="fine-print" href="/pricing">See pricing</a>
</section>:root {
--ink: #1f1f1f;
--muted: #5f6368;
--brand: #0b57d0;
}
body { color: var(--ink); line-height: 1.5; }
.hero { display: grid; gap: 1rem; justify-items: start; padding: 3rem 1rem; }
h1 { font-size: 2.441rem; line-height: 1.15; margin: 0; }
.lead { font-size: 1.25rem; color: var(--muted); margin: 0; }
.actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.button {
padding: 0.6rem 1.2rem;
border-radius: 4px;
border: 2px solid var(--brand);
text-decoration: none;
font: inherit;
}
.button--primary { background: var(--brand); color: #fff; font-weight: 700; }
.button--secondary { background: transparent; color: var(--brand); font-weight: 400; }
.fine-print { font-size: 0.875rem; color: var(--muted); }Here is how the cues divide up:
- Heading: The largest size and the darkest text, placed first at the top left.
- Lead paragraph: A medium size in muted gray. It is readable but quieter than the heading.
- Primary button: A filled background and bold weight. Its position comes right after the text it acts on.
- Secondary button: The same shape and size, but outline only, so it reads as an alternative.
- Fine print: The smallest size and muted color, with no decoration.
The muted gray #5f6368 on white has a contrast ratio of about 6:1, so it passes the WCAG 4.5:1 minimum for body text. Quiet does not mean unreadable.
Common errors
| Mistake | Effect | Fix |
|---|---|---|
| Two filled, brightly colored buttons side by side | The reader cannot tell which action is preferred | Keep one filled, make the other an outline or text link |
| A large banner image with saturated color above the heading | The image outranks the message | Reduce its saturation or size, or move it beside the text |
| Bold used for whole paragraphs | Bold stops signaling importance | Reserve bold for short labels and key terms |
| Gray text lowered below 4.5:1 to look "subtle" | Supporting content becomes hard to read | Make it quieter through size or weight, and keep the ratio |
| Every card has its own accent color | Cards compete with each other | Use one accent color for the primary action only |
A quick check
Change one cue at a time and look at the page again. If you can still name the first thing you see, the hierarchy is working. If two elements tie, lower the cues on the one that matters less.
Exercise
A pricing card has a large bold title, a bright orange "Buy" button, a bright green "Best value" badge, and a red strikethrough old price. Visitors say they don't know where to look first. Which element should be the primary one, and what would you change?
Show answer
The "Buy" button is the primary element, because it is the action the card exists for. Keep its bright fill. Tone down the green badge (a smaller size, a muted or outlined style), and make the old price smaller and gray instead of red. The title can stay large, but not bolder or larger than the card's role needs. This leaves one strongly contrasting element and gives secondary items at most one cue each.