Sub topic 3
Using White Space to Separate and Group
This chapter assumes you know basic typography vocabulary (typeface, size, weight, line spacing). It also assumes you have used a layout tool such as Figma, Canva, or InDesign, and that you have read the chapter on proximity. Proximity says that related items belong close together. White space is the material you use to make that true.
What white space is
White space is any area of a layout with no content in it. It is also called negative space. It does not have to be white. A dark slide with empty areas has white space in the same sense.
White space appears in several places:
- Margins around the edge of the page or container.
- Padding between a container's edge and its content.
- Gutters between columns or cards.
- Gaps between items, such as a heading and the paragraph below it.
- Line spacing (leading) between lines of text, and letter spacing between characters.
Beginners often treat white space as leftover room to fill. Treat it as a tool. The amount of space between two items tells the reader how closely they are related.
Two jobs: separating and grouping
White space does two jobs at once, and they are opposite sides of the same decision.
- Grouping. Small gaps pull items together. Two lines with a small gap read as one unit.
- Separating. Large gaps push groups apart. A large gap between two units tells the reader that a new topic begins.
The reader does not measure the pixels. They compare gaps. A 16px gap looks tight next to a 48px gap, and it looks loose next to a 4px gap. So the useful question is always relative: is the space inside a group clearly smaller than the space between groups?
Building a spacing scale
Choosing a new gap value for every pair of elements leads to a layout that feels random. A better habit is to pick a small set of spacing values and reuse them. This is a spacing scale. A common choice is multiples of a base unit, often 4px or 8px.
| Step | Value | Typical use |
|---|---|---|
| xs | 4px | Between an icon and its label |
| sm | 8px | Between a heading and its paragraph |
| md | 16px | Between paragraphs, or form fields in one section |
| lg | 32px | Between cards or content blocks |
| xl | 64px | Between major page sections |
The scale does two things. It keeps the steps far enough apart that readers can tell them apart. A gap of 14px next to 16px looks like a mistake, not a decision. It also supports repetition, because the same value does the same job everywhere.
A worked example: a card list
Consider a list of article cards. Each card has a title, a short description, and a link. The first version below uses the same gap for everything.
.list-flat {
display: grid;
gap: 16px;
max-width: 40ch;
}If every title, description, link, and card is separated by 16px, the reader cannot tell where one card ends and the next begins. The link of card one looks as close to card two's title as to its own description.
The fix is to use a small gap inside each card and a larger gap between cards.
.list {
display: grid;
gap: 32px;
max-width: 40ch;
padding: 0;
margin: 0;
list-style: none;
}
.card {
display: grid;
gap: 8px;
}
.card h2 {
margin: 0;
font-size: 1.25rem;
}
.card p {
margin: 0;
line-height: 1.5;
}
.card a {
margin-top: 4px;
}Inside a card, items sit 8px apart (4px more before the link). Between cards, the gap is 32px, four times larger. The cards now read as separate units without any borders or lines.
Prefer space over lines
A common instinct is to draw a rule or a box around each group. Lines work, but each one adds visual weight and competes for attention. Try space first. If the groups are still unclear, add a light divider or a background tint.
Here is a rough order of how strong each separator is:
- A small gap (weakest grouping signal on its own).
- A large gap.
- A subtle background color change.
- A thin line.
- A heavy border or a box with a shadow (strongest).
Use the weakest signal that does the job. A page where every group sits in its own bordered box looks cluttered, and the boxes hide the real hierarchy.
Margins and padding
Space around a layout matters as much as space inside it.
- Margins. Content pushed against the edge of the page or slide feels cramped and can be cut off when printed. Give the whole layout a margin at least as large as your largest in-group gap, and usually larger.
- Padding. Text inside a button or card needs room. A button with
padding: 2pxlooks like a clipped label. As a starting point, make horizontal padding larger than vertical padding for buttons, such as8px 16px. - Consistency. Equal padding on all sides of a card looks balanced. Uneven padding looks accidental unless you chose it to communicate something.
.button {
display: inline-block;
padding: 8px 16px;
border: 0;
background: #0b5fff;
color: #ffffff;
}
.panel {
padding: 24px;
margin: 0 auto;
max-width: 60rem;
}Line spacing and text blocks
White space also lives inside paragraphs. Line spacing controls how easily the eye moves from the end of one line to the start of the next.
- Body text usually reads well at a line height of 1.4 to 1.6 times the font size.
- Long lines need more line height than short lines, because the eye has farther to travel back.
- Headings are shorter and larger, so they usually need less line height, around 1.1 to 1.3.
- Keep line length around 45 to 75 characters. The
chunit in CSS is a convenient way to cap it, for examplemax-width: 65ch.
Paragraph spacing should be larger than line spacing. If the gap between paragraphs equals the gap between lines, paragraphs run together. If paragraph gaps are much larger, the text breaks into disconnected pieces.
Space around headings
Headings are the most common place where spacing goes wrong. A heading introduces the text after it, so it should sit closer to the text below than to the text above.
h2 {
margin: 48px 0 8px;
}
h2 + p {
margin-top: 0;
}In this example the heading has 48px above it and 8px below. The big gap above closes the previous section. The small gap below attaches the heading to its own content. If the two margins are equal, the heading floats between sections and the reader has to guess which one it belongs to.
Using space to create emphasis
Space can also add emphasis, which connects this chapter to contrast. An element surrounded by generous space attracts attention, because nothing competes with it. This is why luxury brands and landing pages often show one product with a large empty area around it.
You can use this on purpose:
- Leave extra space above and below a key statistic or call to action.
- Isolate the main button from nearby links.
- Give a slide title a full band of empty space instead of surrounding it with graphics.
The cost is that space is limited. If every element gets extra room, none stands out, and the layout becomes spread out and hard to scan.
Common errors
These are the problems you will see most often when white space is handled badly.
- Uniform gaps. Every gap is the same, so there is no grouping. Fix it by shrinking in-group gaps or growing between-group gaps.
- Near-equal gaps. Gaps of 12px and 16px differ too little to read as different. Make the steps clearly distinct, usually by a factor of about 1.5 or 2.
- Trapped space. A gap sits in the middle of a layout, such as a hole between a column and an image, and breaks the flow. Move items so empty areas gather at the edges or form clear separations.
- Cramming. Content fills every inch to avoid "wasting" room. Cut content or split it across more sections instead of shrinking the gaps.
- Spreading. Everything is pushed apart to fill the page, so groups dissolve. Keep related items together and let the extra space gather around the whole layout.
- Space doing the wrong grouping. A caption sits closer to the next image than to its own image. Check each caption, label, and heading to see which neighbor it is nearest to.
A quick method to check your spacing
You can test any layout in a few steps.
- Squint. Blur your eyes or view the layout at thumbnail size. The groups you can still see are the groups your spacing creates.
- Name the groups. List what you meant to group. Compare that with what you saw while squinting.
- Measure the gaps. Check that each in-group gap is clearly smaller than the gap around its group.
- Check the outside. Confirm that the margin around the layout is at least as large as the largest gap inside it.
- Trim lines. Remove any border or divider and see whether the groups still read. If they do, leave it out.
Summary of decisions
| Situation | What to do with space |
|---|---|
| Items belong together | Use the smallest step in your scale between them |
| Two groups are separate topics | Use at least double the in-group gap between them |
| A heading introduces text | Put more space above than below |
| Something must stand out | Surround it with extra space |
| Layout feels cramped | Cut content, then increase margins |
| Groups feel disconnected | Reduce the gaps between related items |
Exercise
A pricing page shows three plan cards. Each card has a plan name, a price, a list of features, and a "Choose" button. All gaps in the page, inside and between cards, are 20px, and readers say they cannot tell which button belongs to which plan. Using the spacing scale in this chapter (4, 8, 16, 32, 64px), what gaps would you set, and why?
Show answer
Set the gaps inside each card to small values from the scale, such as 8px between the plan name and price, 16px between the price and feature list, and 16px before the button. Set the gap between cards to 32px or more, which is at least double the largest in-card gap. The gap inside a card is now clearly smaller than the gap between cards, so each button groups with its own plan. Using scale values also makes the steps distinct, which 20px next to 16px would not be.
Exercise
A blog page has an h2 with margin 24px above and 24px below. The heading seems to float between two paragraphs. What change fixes it, and which principle does it apply?
Show answer
Increase the space above the heading (for example 48px) and decrease the space below it (for example 8px). The heading then sits closer to the text it introduces and further from the previous section. This applies proximity, using white space to show which content the heading belongs to.