Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 36 ยท Interaction and Visual Design

Visual Hierarchy and Layout

Learn how size, contrast, spacing, alignment and grids guide the eye, so users see the most important thing first. Includes live layout experiments.

People rarely read a screen. They scan it, in a fraction of a second, and decide where to look first. Visual hierarchy is the order in which the eye moves across a page, and as a designer you control it. When the hierarchy matches the importance of the content, the page feels easy. When everything shouts, or nothing does, users feel lost and leave.

This lesson covers the tools that create hierarchy (size, weight, contrast, color, space and position), how grids keep layouts orderly, and a quick squint test to check your work. Later lessons build on it: typography and color refine the same ideas.

The tools of hierarchy

Six ways to say "look here first"

Size Bigger things feel more important.
Contrast Dark on light stands out from grey on grey.
Color One bright accent among calm neutrals.
Space Room around an item gives it weight.

Also weight (bold) and position (top left first in left-to-right languages).

1 / 2

Size and weight. A page title should be larger than a section heading, which should be larger than body text. Use a small set of sizes and keep the steps clearly different. Two sizes that differ by 2 pixels look like a mistake, not a choice.

Contrast. The element with the strongest contrast against its background wins attention. A primary button in a saturated color on a calm page is the classic example.

Space. Whitespace (empty space) is not wasted. It separates groups and lets the important item breathe. Crowded screens flatten the hierarchy because every item competes with its neighbors.

Position. In left-to-right languages, people scan from the top left. Put identity and the main message there. Right-to-left languages mirror this, so build layouts that can flip.

Gestalt principles in one minute

Gestalt psychology describes how the brain groups what it sees. Three rules matter most in interface work:

  • Proximity: items that are near each other are read as a group. Put a label closer to its own field than to the previous one.
  • Similarity: items that look alike are read as the same kind. All links share one style; all buttons share another.
  • Common region: a box, card or background color around items groups them, even if spacing is equal.
Same content, two hierarchies

Both cards hold the same facts. The right one makes the price and the single action the loudest items, and pushes secondary facts to a quieter gray line.

Layout and grids

A grid is an invisible set of columns and gutters (the gaps) that every element snaps to. Grids make pages feel calm because edges line up. Common choices are a 12-column grid for websites (it divides into halves, thirds and quarters) and a 4-column grid for phones. Many teams also use a spacing scale such as 4, 8, 16, 24, 32, 48 pixels, so spacing is never an arbitrary number.

Python Visualize a 12-column grid

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

This is a stand-in, not a design tool: it only shows how spans add up to the 12 columns that a responsive CSS grid would use.

The squint test

To test hierarchy without any tools, blur your eyes (or reduce your screenshot to a few pixels wide) and ask:

  1. What do I see first? Is it the thing the user needs?
  2. What do I see second? Does that match the intended path?
  3. Do related items still look grouped?

If the first thing you see is a decoration, a banner or a footer, fix the hierarchy before you polish anything else.

Common mistakes

  • Making everything bold or colorful, so nothing stands out.
  • Several primary buttons on one screen. Keep one primary action; make the others secondary.
  • Equal spacing between everything, which hides groups.
  • Misaligned edges by a few pixels, which reads as sloppiness.

Design in grayscale first. If the hierarchy works without color, color will only make it stronger.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which change most directly raises the importance of a price on a product card?

    Size, weight and surrounding space are the main tools to make an item stand out.
  2. 2. Which Gestalt principle explains why a label should sit closer to its own input than to the previous input?

    Proximity: things placed near each other are perceived as belonging together.
  3. 3. What is the squint test?

    Blurring removes detail so only the hierarchy of size, contrast and position remains.
  4. 4. Why use a spacing scale such as 4, 8, 16, 24?

    A fixed scale avoids arbitrary values, so related spacing looks consistent across screens.

Summary

  • Hierarchy is the order in which the eye reads a screen; you create it with size, weight, contrast, color, space and position.
  • Gestalt principles (proximity, similarity, common region) explain how users group elements.
  • Grids and a spacing scale keep edges aligned and layouts consistent.
  • Use the squint test and design in grayscale first.
  • One primary action per screen keeps the path clear.

Next: Typography and Color for UX