Sub topic 9
Line Length and Comfortable Measure
Measure is the width of a column of text, usually counted in characters per line. It is one of the two settings, along with line height, that decide whether body text is comfortable to read in long stretches. This chapter explains how to choose a measure, how to set it in CSS, and what goes wrong when it drifts.
This chapter assumes you know the basic vocabulary of type (typeface, font size, weight) and can read simple HTML and CSS. It builds on the body text baseline and line height chapters.
Why measure affects reading
When you read, your eyes jump along a line and then sweep back to the start of the next one. Two things can go wrong with that return sweep.
- Lines that are too long. The eye must travel far to get back, and it can land on the wrong line. Readers lose their place and re-read lines.
- Lines that are too short. The eye makes a return sweep every few words. Reading becomes choppy, and the text breaks into many small fragments. Narrow columns also produce awkward word spacing in justified text and many hyphenated words.
A comfortable measure keeps the return sweep short enough to be reliable and keeps lines long enough to give the reading a rhythm.
Measure also supports the hierarchy. A body column with a steady width gives headlines and subheads a stable edge to align against, and the reader's eye learns where each new line begins.
How long should a line be?
A widely used rule of thumb for single-column body text is 45 to 75 characters per line, including spaces. About 66 characters is often quoted as ideal. The Web Content Accessibility Guidelines (WCAG) suggest no more than 80 characters per line for text blocks, at the AAA level of conformance (success criterion 1.4.8, Visual Presentation).
These numbers are starting points, not laws. The right value depends on the context.
| Context | Typical measure | Reason |
|---|---|---|
| Long-form article, single column | 55 to 75 characters | Supports sustained reading |
| Mobile screen | 35 to 50 characters | The screen is narrow, so the column is limited by the device |
| Multi-column newsletter or magazine | 30 to 45 characters | Narrow columns suit scanning and short items |
| Captions and footnotes | 40 to 60 characters | Smaller type allows a slightly narrower column |
| Code or data tables | Set by content | Alignment matters more than a reading rhythm |
Other factors move the target.
- Line height. Longer lines need more leading, because a taller gap between lines helps the eye find the next line. A measure near 75 characters with a line height of 1.5 or more is more comfortable than the same measure at 1.2.
- Typeface. Fonts with a large x-height or wide letterforms fit fewer characters in the same width.
- Reader and purpose. Skimming reference material tolerates shorter lines. Immersive reading (a novel, an essay) tolerates longer ones.
- Language. Languages with longer average words, such as German, may need slightly wider columns to avoid heavy hyphenation.
Setting measure in CSS
You could set a column width in pixels, but pixels do not follow the font. If a reader increases the text size, a pixel-width column holds fewer characters. The ch unit solves this. One ch equals the width of the zero character ("0") in the current font and size, so it tracks the type.
body {
font-family: Georgia, serif;
font-size: 1rem;
line-height: 1.5;
}
p {
max-width: 65ch;
}
h1 {
font-size: 2.441rem;
line-height: 1.15;
font-weight: 700;
}The p rule caps paragraphs at 65 ch. On a wide screen the paragraph stops growing at that width. On a narrow screen max-width does nothing, and the paragraph fills the available space. This is why max-width is the right property here, rather than width. A fixed width of 65ch would overflow a small phone screen.
One caveat: ch measures the zero glyph, and average letters in running prose are usually a little narrower than zero. A column of 65ch therefore often holds somewhat more than 65 characters of real text, commonly 70 to 80 in proportional fonts. If you need a strict count, test with real copy. Many designers set 60ch to land in the target range.
Where to put the limit
Applying max-width to every p works for simple pages, but it leaves headings and other elements at a different width. A common alternative is to limit the whole article container.
article {
max-width: 65ch;
margin-inline: auto;
padding-inline: 1rem;
}Now the headline, subheads, and paragraphs all share one left edge and one column width. The margin-inline: auto centers the column, and padding-inline keeps text off the screen edge on narrow devices.
There is a catch with ch on a container. Its value depends on the font size of the element it is set on. If article inherits the body size of 1rem, 65ch is calculated from that size. A headline with a bigger font does not change the container width, so a large headline may wrap earlier than the body text does. That is usually what you want, because large type with fewer characters per line is acceptable.
Giving different elements their own measure
Elements at different sizes can have different measures. A lead paragraph set larger than body text has a wider letter width, so the same ch value gives a wider column. If you want the lead to share the body's column, set the limit on the container, not the paragraph.
<article>
<h1>Headline states the main idea</h1>
<p class="lead">A short intro sentence in slightly larger text.</p>
<h2>Subhead introduces a section</h2>
<p>Body text carries the detail.</p>
</article>Measure in the larger layout
A column of 65 characters leaves empty space on a wide screen. That space is fine. White space around a text column is not wasted, and it is often what makes a page feel calm. You have several options for using it.
- Center the column with automatic inline margins, as above.
- Add a sidebar or margin notes for captions, pull quotes, or navigation, kept outside the main reading column.
- Use multiple columns only when the content suits scanning, and keep each column within a comfortable measure.
- Align to a grid. A column grid lets text span a fixed number of columns, so measure stays consistent across pages. The alignment and grid chapter covers this.
Do not stretch text to fill the screen just to avoid empty margins. A full-width paragraph on a 1920-pixel display can exceed 200 characters per line, which is hard to read.
Common errors
- Setting no limit. Paragraphs expand with the window, and readers on large monitors get very long lines. Fix: add
max-widthinch. - Using
widthinstead ofmax-width. The column overflows narrow screens and forces horizontal scrolling. - Using pixels. The measure changes when the user changes text size or the typeface changes. Prefer
ch, oremandremunits. - Forgetting side padding. On a phone, a column with a
max-widthstill touches the screen edge unless you add padding. - Narrow columns with justified text. Justified text in a short column produces uneven gaps between words ("rivers" of white space). Use left-aligned text, or turn on hyphenation with
hyphens: autoand alangattribute on the page. - Changing line height but not measure. If you tighten leading for a headline, remember that its measure matters too. Headlines can run to a few lines, and a line of 20 to 40 characters often reads well at large sizes. The headline is shorter, so its measure is controlled by wrapping.
Controlling how headlines wrap
Large headlines can end with a single word on the last line (an orphan, in the loose sense used by many designers). Modern CSS lets you balance the lines.
h1, h2 {
text-wrap: balance;
}
p {
text-wrap: pretty;
}text-wrap: balance spreads text more evenly across the lines of a short block. It is meant for headings and is limited by browsers to a small number of lines. text-wrap: pretty asks the browser to avoid awkward short last lines in paragraphs. Both are hints and degrade safely in browsers that do not support them.
Measure and responsive design
On small screens, the column is limited by the device, so the measure often falls below 45 characters. That is acceptable. Do not shrink the font to fit more characters per line, since body text below about 16 px hurts legibility. Instead:
- Keep the base size at 1rem.
- Use side padding of about 1rem.
- Let headlines wrap, using
text-wrap: balance.
On tablets and desktops, max-width: 65ch takes over and holds the measure steady. This single declaration gives you a layout that adapts without media queries.
Testing a measure
You can check measure without special tools.
- Count characters. Select a typical full line of body text and count the characters, including spaces. Check several lines, because line breaks vary.
- Use real copy. Placeholder text such as "lorem ipsum" has different word lengths from your actual language and misleads the count.
- Check the extremes. Resize the window from phone width to a wide monitor, and zoom the text to 200 percent. The column should stay readable at each stage.
- Read a long passage. If you lose your place at the end of lines, the measure is probably too long. If you feel the text is choppy, it is probably too short.
// Paste into the browser console to count characters per line of the first paragraph.
const p = document.querySelector("p");
const range = document.createRange();
const textNode = p.firstChild;
const lines = [];
let start = 0;
let lastTop = null;
for (let i = 0; i < textNode.length; i++) {
range.setStart(textNode, i);
range.setEnd(textNode, i + 1);
const rect = range.getClientRects()[0];
if (!rect) continue;
if (lastTop !== null && rect.top > lastTop + 2) {
lines.push(textNode.data.slice(start, i).length);
start = i;
}
lastTop = rect.top;
}
lines.push(textNode.data.slice(start).length);
console.log("Characters per line:", lines);The script reads each character's position, starts a new count when the vertical position changes, and prints the length of every line. It works on a paragraph whose first child is a plain text node, so it will not handle a paragraph that begins with a link or emphasis.
Summary of decisions
- Aim for roughly 45 to 75 characters per line for continuous body text.
- Set the limit with
max-widthinch, on the paragraph or on the article container. - Pair longer lines with more generous line height.
- Accept shorter lines on phones, and do not shrink the type to compensate.
- Check the result with real copy at several window widths and zoom levels.
Exercise
A page sets p { width: 80ch; } with 1rem Georgia body text. On a 360-pixel-wide phone, readers must scroll sideways, and on a desktop the lines hold about 90 characters. Which two changes fix both problems, and why?
Show answer
Change width to max-width so the paragraph can shrink to fit a narrow screen instead of overflowing, and lower the value to about 60ch to 65ch so that real text lands in the 45 to 75 character range, since average letters are narrower than the zero glyph that ch measures. Add some side padding such as padding-inline: 1rem on the container so text does not touch the screen edge on the phone.
Exercise
A designer wants the lead paragraph, set at 1.25rem, to line up with the body paragraphs, set at 1rem, in the same column. Why can setting max-width: 65ch on each paragraph fail to do this, and what is a better approach?
Show answer
The ch unit depends on the font size of the element it is set on, so 65ch on the 1.25rem lead is 25 percent wider than 65ch on the 1rem body paragraphs, and the right edges do not match. Set the max-width once on the shared container, such as article { max-width: 65ch; }, so every child sits in the same column. The lead then holds fewer characters per line, which is acceptable for larger type.