liveBook · Manning

Code readability

As explained in Design for Developers

Readability is the degree to which written content can be visually perceived and understood with ease.

Readability is how easily people can read and understand written content. On a website or application, readable text helps people scan for information without strain; poor typography or contrast can make them leave. Treat it as a usability and accessibility concern, not a decorative finishing touch. section 8.2.6 section 2.1.4

Make body text easier to read by choosing and testing its visual conditions:

  • Use a readable, legible typeface at its intended size. Reserve decorative fonts for short display use, not long body copy. section 8.2.1
  • Keep paragraph lines roughly 45–70 characters long. Narrower lines support scanning; overly long lines make sustained focus harder. section 8.2.6
  • Give text sufficient line height, and make letter-spacing adjustments small and purposeful. Excessive spacing in either direction impairs reading. section 8.2.6 section 8.3
  • Provide strong text-to-background contrast, especially in typography and form elements; do not rely on pale colors or thin white text over busy images. section 2.1.4 section 9.9

Text placed over an image

White text over a light or busy photograph is difficult to read. Choose a darker, calmer image; add a dark gradient treatment; or place text on a solid-color shape and check the resulting color contrast. A solid background is the simplest way to make the text reliably readable. section 10.6.2 section 2.1.4

Figure 8.25 Letter spacing in either direction can cause readability problems.

Compare overly loose and overly tight letter spacing to see why small, tested adjustments matter more than forcing text to fill a line. section 8.2.6

Readability also depends on the relationship between type and layout. For example, a 16px paragraph with a 1.25 line-height produces 20px line spacing; heading line height can be tighter when headings contain little text. Adjust spacing in concert with line length and test the result with people and lower-resolution devices. section 10.5 section 8.2.1

How Design for Developers covers it

How deep it goes
Explains practical controls—font choice, line length, letter spacing, line height, and image treatments—without typography-engine internals.
Examples
Uses overly tight or loose letter spacing, white text on light or busy images, pale text backgrounds, and a 16px body-copy calculation.
What you can do after
Apply it via CSS and design tools by setting readable line lengths and spacing, testing fonts, and improving text-background contrast.
How it connects
Connects readability to accessibility, WCAG line-height guidance, color contrast, typography, line length, letter spacing, and vertical rhythm.

Also explained in

Compare how 11 books explain code readability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Design for Developers. The section links point to the parts of the book it draws on.