Sub topic 1
Why layout principles matter: guiding the reader's eye
Readers do not read a page from top to bottom. They scan it. In the first second or two, they decide where to look first, what belongs together, and whether the page is worth more time. Layout principles give you control over that scan. This chapter introduces visual hierarchy and the four principles the rest of the tutorial covers: contrast, alignment, repetition, and proximity. These were popularized by Robin Williams in The Non-Designer's Design Book.
Prerequisites
This chapter assumes you have the following:
- Basic familiarity with a design or layout tool such as Figma, Canva, Illustrator, or InDesign.
- Basic typography vocabulary: typeface, font size, weight, and line spacing.
- Knowledge of common layout elements: headings, body text, images, and buttons.
The CSS examples are short and only illustrate the ideas. You can follow the chapter without writing CSS.
What visual hierarchy is
Visual hierarchy is the order in which a viewer notices and reads the elements on a page. A strong hierarchy makes that order obvious. The reader sees the most important item first, then the next, and so on.
A weak hierarchy makes everything look equally important. The reader has to work out where to start, and many readers leave instead.
Hierarchy is not decoration. It is a decision you make about what matters most, and you then show that decision through layout.
The four principles as tools
Each principle answers a different question about the reader's experience.
| Principle | Question it answers | Typical tools |
|---|---|---|
| Contrast | What should I look at first? | Size, weight, color, typeface |
| Alignment | Does this page feel organized? | Shared edges, grids |
| Repetition | Is this one consistent piece? | Fonts, colors, spacing, component styles |
| Proximity | Which things belong together? | Spacing, grouping |
The principles work together. Later chapters take each one in turn, then combine them and use them to diagnose flawed layouts.
A worked example: the same content, two layouts
Take a simple event flyer with a title, a date, a location, a short description, and a sign-up button. Now imagine two versions.
In the first version, every line uses the same size and weight. The lines are evenly spaced. Some are centered, some are left-aligned, and the button uses a different font from everything else. The reader cannot tell the title from the description. They cannot tell whether the date goes with the location or with the description.
In the second version, the title is large and bold. The date and location sit close together as one group. A larger gap separates that group from the description. Everything shares one left edge. The button repeats the page's accent color.
The words are identical. Only the layout changed, and the second version is faster to read.
A first look in code
You do not need code to apply these ideas, but CSS shows each decision as a concrete number. This card uses two of the principles:
.card {
display: grid;
gap: 8px;
padding: 24px;
max-width: 40ch;
}
.card h2 {
margin: 0;
font-size: 1.5rem;
font-weight: 700;
}
.card p {
margin: 0;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
}
.card + .card {
margin-top: 32px;
}Items inside a card sit 8px apart, while cards sit 32px apart. That difference applies proximity: the small gap says "these belong together" and the large gap says "this is a new group." The heading differs from the body in size and weight, which applies contrast.
How the eye moves through a page
The flow is a simplification. Real readers jump around. But each step shows a place where a principle either helps or fails to help.
Common errors at this stage
- Treating everything as important. If you make five items bold and large, none of them stands out. Choose one primary element per view.
- Using space evenly. Equal gaps between every element hide the relationships between them.
- Starting with decoration. Fix hierarchy and grouping before you add color or effects.
- Judging by your own knowledge. You know the content, so a weak layout can seem fine to you. Test by asking someone unfamiliar with it what they see first.
Check your understanding
Exercise
A flyer shows a title, date, location, and description, all in the same size and weight and evenly spaced. Name two principles you would apply first, and say what each would change.
Show answer
Contrast: make the title larger and bolder so it is clearly the first thing read. Proximity: put the date and location close together, and add a larger gap before the description so related items form groups. Alignment and repetition would follow once hierarchy and grouping are clear.
Exercise
In the card CSS above, which lines create the grouping, and which create the hierarchy?
Show answer
The grouping comes from the 8px gap inside each card compared with the 32px margin between cards (proximity). The hierarchy comes from the heading's larger font size and bolder weight compared with the body text (contrast).