Line length and tracking
beginner·7 min·Markdown for agents
What this lesson teaches
Keep paragraphs between 45 and 75 characters a line, tighten big type and open tiny labels, and choose how headings and blurbs wrap.
This paragraph starts too wide on a laptop. Pull the width slider left until the count turns green, and read it again.
The eye reads a line, then swings back to find the start of the next one. If the line is too long, it loses its place on the way back; too short, and the constant swinging turns reading into a chore. Somewhere around sixty-five characters, the rhythm just works, and you stop noticing that you are reading at all.
Body text wants letter-spacing 0 and line-height 1.5–1.6. On a phone the screen caps the line for you; widen the window to see long lines.
The text didn't change. The reading did.
45 to 75 characters
The number of characters per line is called the . Robert Bringhurst's rule, which typographers have used for decades: 45 to 75 characters, with about 65 as the sweet spot for prose.
Why it matters: your eye reads a line, then swings back to find the start of the next. Too long and it loses its place on the way back. Too short and the constant swinging turns reading into work.
In CSS it's one line, thanks to the :
.prose { max-width: 65ch; } /* Tailwind: max-w-prose */On a wide screen this means a narrow column with space either side. That's correct. A 2,400px-wide paragraph is not "using the space", it's unreadable.
Tracking: tighter as type grows
is space added evenly between all letters (letter-spacing). It runs opposite to size. Drag the size up to a headline, then find the spacing that looks right.
Ship the details
Big type looks loose at its default spacing. Tighten it.
| Size | Tracking |
|---|---|
| 10–12px | +0.04 to +0.08em (often uppercase) |
| 14–18px body | 0 |
| 20–28px | −0.01 to −0.02em |
| 32–48px | −0.02 to −0.04em |
| 64px+ | −0.04 to −0.06em |
Forgetting to tighten display text is one of the most common amateur tells. A 56px headline at default spacing looks loose and slightly cheap.
Don't confuse tracking with , the font's own fixes for specific pairs like "AV". Kerning is built in and stays on.
Uppercase has rules
All-caps text is harder to read because every letter is the same height. Use it only:
- at small sizes (10–12px) with wide tracking, for nav, badges and table headers,
- or for very short phrases, under about four words.
Never for paragraphs. And be careful with the tiny tracked label above every heading (the "eyebrow"): taste-skill's gallery study found it on more than half of weak sites and a sixth of strong ones. Usually its words belong in the heading itself.
Choose how lines break
Two newer CSS values decide where lines wrap. Try them on a narrow column.
Design engineering for people who build with agents
Learn the details that make a working interface feel right, then get your agent to build them every time.
The default fills each line greedily. Look for one word stranded on the last line.
text-wrap: balancefor headings. It evens out the line lengths so you don't get a long line and a one-word line.text-wrap: prettyfor card blurbs, standfirsts and empty-state copy. It stops the stranded last word, the .- Neither on long paragraphs. Browsers cap balance at a few lines, and a balanced paragraph narrows every line.
are supported in current Chrome and Safari, so you can ship them without a fallback; older browsers simply wrap normally.
Left-aligned, almost always
The ragged right edge is the eye's landmark. Justified text without hyphenation opens "rivers" of white space; centered text works for a short headline and fails past two lines.
Tune the reading experience: - Cap every reading column at max-width: 65ch (check the count again if the font changes). - Letter-spacing by size, in em: 0 for body, -0.02em around 32px, -0.04em at 64px+, +0.06em on small uppercase labels. - text-wrap: balance on h1–h3; text-wrap: pretty on card descriptions and empty states; nothing on article paragraphs. - Left-align body copy. Uppercase only for short labels at small sizes.
Quick check
A blog post's paragraphs run the full 1200px width of a laptop. What's the fix?
In the skill
The nodes your agent reads when it does this work.
- Line length, tracking, and text wrap
typography/line-length-tracking - Line behaviorCap the measure near 65ch, pick a wrap mode per role, guard overflow both ways, never truncate without a route to the full text, case with CSS, type real punctuation, tune underlines, write direction-neutral CSS, and hold the size and contrast floors.
typography/line-behavior
Connected lessons
What this lesson builds on and leads to, across every course.