Sub topic 3
Line length: the measure
This chapter assumes you know what a font and font size are, and that you can read a basic CSS rule. The next chapter gives target ranges. Here you learn what the measure is, how to count it, and what goes wrong when it is off.
What the measure is
The measure is the length of a line of text. Typographers also call it line length. You can express it in three ways:
- Characters per line, including spaces and punctuation.
- A physical or screen width, such as 600 pixels or 30 em.
- Words per line, which is a rough estimate (English averages about 5 to 6 characters per word, plus a space).
Characters per line is the most useful unit. A column that is 600 pixels wide holds about 60 characters at 16 px, but only about 40 at 24 px. The width stayed the same and the reading experience changed, because type size and measure are linked.
Why the measure affects reading
When you read, your eyes move in short jumps across a line. At the end of a line they sweep back to the start of the next one. The measure affects both movements.
- Lines that are too long. The return sweep travels a long way, and it is easy to land on the wrong line or lose your place. Readers slow down and reread.
- Lines that are too short. The eyes jump back and forth constantly. Sentences break into fragments, and the rhythm of reading turns choppy. Narrow columns also force awkward word spacing or many hyphenated words.
A good measure sits between these extremes. The reader's eyes settle into a steady rhythm and rarely lose their place.
Measuring a line
To count the measure of a real line, take a typical full line of body text, not the last line of a paragraph, and count every character, spaces included. Do this for several lines and note the range. Because text wraps at word boundaries, lines in the same paragraph differ by a few characters.
You can also check it with a few lines of code. This Python script counts characters per line after wrapping text at a given width:
import textwrap
text = (
"The measure is the length of a line of text. "
"Counting characters per line is the most reliable way "
"to compare columns set in different sizes."
)
for width in (30, 60, 90):
lines = textwrap.wrap(text, width=width)
lengths = [len(line) for line in lines]
print(f"width={width}: {len(lines)} lines, lengths={lengths}")The output shows that the same text produces many short lines at width 30 and few long lines at width 90. Real browsers wrap by pixel width instead of character count, but the pattern is the same.
Common errors
- Letting text fill the window. A paragraph with no width limit stretches across a wide monitor, and lines can run past 150 characters.
- Thinking in pixels only. A width that suits 16 px text is too wide for 12 px text. Always check the resulting character count.
- Measuring the last line. The final line of a paragraph is usually short. Count a full line in the middle.
- Forgetting the context. Captions, sidebars and headings follow different needs than the main body text, so one number does not fit every element.
What comes next
You now have the concept and a way to count it. The next chapter gives commonly cited character ranges, and a later one shows how to set the measure in CSS.
Exercise
A paragraph is set in a column 480 px wide. At 16 px type, a full line holds about 56 characters. If you raise the type size to 24 px and keep the column at 480 px, will the measure get longer or shorter, and why?
Show answer
It gets shorter. Larger characters take more horizontal space, so fewer fit in the same 480 px width. The line would hold roughly 37 characters (56 × 16 ÷ 24), which is close to the too-short end. The width did not change, but the measure in characters did.