Core Foundations · 8 min read · Beginner
Typography, Readability & text-wrap
Craft editorial-grade reading experiences with comfortable measure (ch), unitless line-height, text-wrap: balance, and tabular numerals.
What you'll learn
- Use unitless line-height (e.g., 1.6) so text scales cleanly
- Limit paragraph width to 60–75ch for effortless scanning
- Eliminate awkward single-word headline orphans with text-wrap: balance
Over 80% of the web is text. Great typography (like you see on web.dev)comes down to four simple CSS habits:
- Unitless
line-height: Always writeline-height: 1.6(not24px) so child headings scale proportionally. - Readable line length: Cap prose containers at
max-width: 65ch. - Balanced headings: Add
text-wrap: balancetoh1–h3so multi-line titles wrap evenly instead of leaving one lonely word on the last line. - Tabular numbers: Add
font-variant-numeric: tabular-numson timers, prices, and progress counters so digits don’t jitter horizontally as they change!
Fill-in-the-Blank Exercise
Modern Editorial Typography
Balance heading line wraps and cap paragraph width at 65 characters.
h1 {
text-wrap: ;
}
p {
max-width: 65;
line-height: 1.65;
}Try It Yourself
Compare the balanced headline vs. the unbalanced headline below, and toggle max-width on the paragraph:
Balanced Headings & Readable Measure
Live Result
Check Your Understanding
Score: 0 / 1
1. What does text-wrap: balance do on a multi-line heading?
Study Workspace
Finished this lesson?
Your progress is saved locally in your browser, no account needed.