Sub topic 8
Building a Z-pattern landing page
This chapter assumes you can write HTML and CSS (Flexbox and Grid basics). It also assumes you know the usual page parts: header, navigation, hero section and call to action (CTA). It builds on the earlier chapters on the Gutenberg diagram and visual hierarchy. Here you turn the Z-pattern into a working page.
What the Z-pattern asks of a layout
The Z-pattern describes how a viewer's eye often travels across a sparse page with little text and a few strong elements. It comes from print design. It is a layout heuristic, not a result from web eye-tracking studies like the F-pattern.
The path has four stops:
- Along the top, from left to right.
- Diagonally down from the top right to the bottom left.
- Along the bottom, from left to right.
- The path ends at the bottom right.
Your job is to put the right content at each stop. The last stop is the one that matters most, because it is where you want the visitor to act.
| Stop | Position | Job | Typical content |
|---|---|---|---|
| 1 | Top left | Identify the page | Logo or brand name |
| 2 | Top right | Offer an exit or secondary action | Navigation, "Log in" link |
| 3 | Middle, along the diagonal | Deliver the main message | Headline, short subheading, hero image |
| 4 | Bottom left | Support the claim | Proof point, such as a customer count |
| 5 | Bottom right | Ask for the action | Primary CTA button |
The table lists five rows because the diagonal carries the message between stops 2 and 4. The path itself has four corners.
Step 1: Write the HTML in reading order
Build the structure first, with no styling. The source order should match the order you want the eye and a screen reader to follow: header, then main content, then the closing strip with the CTA.
Use landmark elements (header, nav, main, footer). They give assistive technology the same map that your visual layout gives sighted users. The path in your head and the path in the DOM should agree. If CSS moves the CTA somewhere that the source order does not reflect, keyboard users will tab through the page in a different order than the one you designed.
Step 2: Position the stops with CSS
Flexbox is enough for the top and bottom rows. Use justify-content: space-between so the first item sits at the left edge and the last item at the right edge. Use Grid for the hero, which gives you two equal columns for the headline and the image.
This page is complete and runs as shown. Save it as index.html and put any image named board.png next to it. Without the image, the alt text appears instead.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Acme: Plan projects in minutes</title>
<style>
body { margin: 0; font-family: system-ui, sans-serif; color: #1b1f24; }
.page { max-width: 60rem; margin: 0 auto; padding: 1rem; }
/* Stops 1 and 2: top edge */
.top { display: flex; justify-content: space-between; align-items: center; }
.top nav a { margin-left: 1.5rem; color: #1b1f24; }
.logo { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: #1b1f24; }
/* Diagonal: headline left, image right */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
align-items: center; padding: 4rem 0; }
.hero h1 { font-size: 2.75rem; line-height: 1.1; margin: 0 0 1rem; }
.hero p { font-size: 1.25rem; margin: 0; }
.hero img { width: 100%; height: auto; border-radius: 0.5rem; }
/* Stops 3 and 4: bottom edge */
.bottom { display: flex; justify-content: space-between; align-items: center;
border-top: 1px solid #d0d7de; padding-top: 1.5rem; }
.cta { padding: 0.75rem 1.5rem; background: #0b5fff; color: #fff;
text-decoration: none; border-radius: 0.25rem; font-weight: 600; }
.cta:focus-visible { outline: 3px solid #1b1f24; outline-offset: 3px; }
/* Narrow screens: the Z collapses into one column */
@media (max-width: 40rem) {
.hero { grid-template-columns: 1fr; padding: 2rem 0; }
.hero h1 { font-size: 2rem; }
.bottom { flex-direction: column; align-items: stretch; gap: 1rem; text-align: center; }
}
</style>
</head>
<body>
<div class="page">
<header class="top">
<a class="logo" href="/">Acme</a>
<nav aria-label="Main">
<a href="/pricing">Pricing</a>
<a href="/login">Log in</a>
</nav>
</header>
<main class="hero">
<div>
<h1>Plan projects in minutes</h1>
<p>One shared board for tasks, deadlines and files.</p>
</div>
<img src="board.png" width="480" height="320"
alt="Project board with three columns of tasks">
</main>
<footer class="bottom">
<p>Used by small teams worldwide</p>
<a class="cta" href="/signup">Start free trial</a>
</footer>
</div>
</body>
</html>A few details in this code matter:
- The
widthandheightattributes on the image reserve space before it loads. Without them the hero shifts as the image arrives, and the diagonal moves under the reader's eye. - The
<p>and the CTA in the footer are separate flex items.space-betweenpushes the proof statement to the left edge and the button to the right edge. - The media query removes the left and right split on small screens. The next section explains why.
Step 3: Make the diagonal carry the message
The diagonal is the weakest part of the Z in practice. Nothing forces the eye to travel from top right to bottom left in a straight line. What you can do is put the headline and image where that travel passes and make them the largest, highest-contrast things on the page.
Apply the hierarchy tools from the earlier chapter:
- Size. The
h1is 2.75rem, more than twice the body text. Nothing else on the page competes with it. - Contrast. Dark text on white for the headline. The only saturated color on the page is the CTA, so color points at the action.
- Whitespace. The 4rem of vertical padding around the hero separates the diagonal zone from the top and bottom rows, so the Z reads as three distinct strokes.
- Position. Content on the left and an image on the right fit the left-to-right habit of readers of left-to-right languages.
Keep the hero short. One headline of about six to ten words and one supporting sentence is enough. Once the middle holds a paragraph or a list, you have moved from a sparse page toward a text page, and the F-pattern advice from the earlier chapter fits better.
Step 4: Place the call to action where the Z ends
The bottom right is the natural resting point of the path, so put the primary CTA there. Three rules help:
- One primary action. Two equally loud buttons split attention. If you need a second action, make it a plain text link.
- Label it with the result. "Start free trial" says what happens. "Submit" does not.
- Repeat it where needed. A visitor who is convinced early should not have to travel to the bottom. Many pages put a copy of the CTA in the hero as well. This is a design choice, not a Z-pattern rule. If you add it, keep the wording identical so the page still has one primary action.
The top right is a tempting place for a CTA, because it is stop 2. Navigation links normally live there, and a button there competes with them. A small "Log in" or "Pricing" link is usually the right content. A single "Sign up" button there can work if the nav is otherwise minimal.
What happens on small screens
On a phone, the page is one column. There is no left and right, so the Z cannot exist. The order becomes a plain top-to-bottom stack: logo, then hero text, then image, then proof, then CTA. The media query in the code does exactly that.
Common errors
- Putting dense text in the diagonal. A paragraph in the hero breaks the sparse-page condition. Cut it or move it below.
- Several competing focal points. Three large images and four buttons give the eye no clear path. Pick one headline, one image and one button.
- Forcing the shape. Placing elements in corners just to draw a Z, with no thought for content, produces awkward layouts. Start with the message and its order, then use the Z as a check.
- Source order that disagrees with visual order. Using
orderor absolute positioning to rearrange the page puts the CTA first or last in the tab order for keyboard users. - Ignoring right-to-left languages. In Arabic or Hebrew the path is expected to mirror. Using
dir="rtl"onhtmltogether with logical properties such asmargin-inline-startkeeps the layout correct. The example above usesmargin-leftfor brevity. For a multilingual page, usemargin-inline-startinstead. - A weak CTA. If the button has low contrast or a vague label, the Z still ends in the right place but the visitor has no reason to click.
Checking your result
Squint at the page or blur it in browser dev tools. The headline, image and CTA should still stand out as the three strongest shapes. Then tab through the page with the keyboard: the focus should move logo, nav links, hero, CTA, in that order. Later in the tutorial you will see how usability testing and heatmaps confirm whether real visitors follow the path. Until then, treat the Z as a hypothesis about your page.
Exercise
In the landing page above, the designer wants to move the "Start free trial" button to the top right, next to the "Log in" link, and leave the bottom strip with only the proof statement. Name two problems this causes for a Z-pattern layout.
Show answer
First, the Z path ends at the bottom right, so the page would end on a weak element and the visitor's last stop has no action. Second, the button would compete with the navigation links at stop 2 and make the top row crowded. A third valid point is that the footer would no longer give the visitor a next step after reading the proof statement.
Exercise
A phone shows the page as one column. Where does the primary CTA appear in the reading order, and what is one way to reduce the risk that visitors never see it?
Show answer
It appears last, after the logo, hero text, image and proof statement, so it may be below the fold. Options include adding a second identical CTA near the hero or making the button sticky at the bottom of the screen.