liveBook · Manning

Line length

As explained in Web Design Playground, Second Edition

Line length is the number of characters displayed on a single line of text.

Line length is the number of characters in one displayed line of text. It is a small typography detail with a big job: lines that run too long are hard to scan, while very short lines make reading feel choppy. section 5.5 section 9.2

For body text on a screen, aim for roughly 50–80 characters per line, with about 65 characters as a useful target. Larger fonts can tolerate longer lines; smaller fonts may need shorter ones. section 9.2 section 5.5

In CSS, control line length by changing the width of the element that contains the text. Width is not a character count, so the resulting line length also changes when the font size changes. No tiny character-count dial, sadly. section 5.5 section 9.2

Narrow a text block

A text block that stretches beyond 150 characters per line is difficult to scan. Giving its containing div a width of 630px produces shorter, more comfortable lines; use border-box when the declared width should include padding and borders. section 9.2 section 9.2

Figure 9.3 In the default width on a large screen, the line lengths of this text are too long for comfortable reading.

Compare the wide default text block with a width-limited version to see why character-heavy lines are harder to scan. section 9.2

How Web Design Playground, Second Edition covers it

How deep it goes
Explains a practical character range and adjusts CSS width and font size, without detailing font metrics.
Examples
Uses a 550px body and a 630px div to shorten overly wide paragraph lines.
What it assumes
Teaches line-length control through basic CSS properties without assuming prior web-design knowledge.
What you can do after
Apply it via CSS width and font-size changes to bring body text into a readable range.
How it connects
Connects line length with CSS width, font size, box-sizing, padding, and borders.

Also explained in

Compare how 4 books explain line length →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.