Typeface, size, line spacing: what makes text readable
AccessibilityIn every website project the typeface gets discussed.
11 min read
By Timo Wessels Published
The typeface is talked about in every website project. Mostly for exactly one round, mostly under the heading “does it fit the brand?”. Font size, line spacing and line length are rarely talked about, although these three decide more about whether your text is read.
This article covers both and separates what is taste from what counts measurably.
The most important points first:
- The font size matters more than the typeface. Take at least 16 pixels, better more.
- Line length, line spacing and no justified text make text readable.
- Your page must be enlargeable to 200 percent without anything being lost.
Three terms to keep apart
The literature distinguishes three properties that in daily life are all called “easy to read” (Rheinwerk, Barrierefreie Webseiten, ch. 6.3):
- Legibility of characters describes how well you recognise single characters and tell them apart. The classic test field is the combination of capital I, small l and the digit 1. In some typefaces those are three identical vertical strokes. Whoever then types an order number is guessing.
- Readability describes how easily a whole text can be read and understood. Typeface, size, line spacing and typesetting work together here.
- Look and feel is the aesthetic effect. It is not minor, since a typeface that pleases increases the motivation to read. It just does not come first.
The order matters. A typeface that fits the brand but makes I and l indistinguishable is the wrong choice, even if it looks better.
The typeface
The WCAG are the international guidelines for accessible websites. They forbid not a single typeface. There is no list of permitted typefaces and no check that makes a typeface fail. There are recommendations from people who have dealt with it.
The three groups in brief (Rheinwerk, ch. 6.3):
- Serif typefaces have small finishing strokes at the ends of letters, for example Times New Roman. In print they are very readable. On low-resolution screens they used to look muddy. With today’s displays that argument hardly holds.
- Slab serif has strong, block-like serifs. It is striking in headings and short texts, less suited for long stretches of reading.
- Sans-serif typefaces have smooth letter ends, for example Arial or Verdana. They look modern and read well on screen.
The concrete recommendation (after Rheinwerk, ch. 6.3, referring to the German association for blind and visually impaired people): humanist sans-serif typefaces. These are typefaces whose shapes follow handwriting and are built more openly, such as Calibri, Verdana, Noto Sans or Open Sans.
Typefaces built for difficult reading situations:
- Atkinson Hyperlegible was developed by the Braille Institute. According to the institute it is meant to improve legibility for people with low vision. Its letters and digits are designed to be clearly distinguishable.
- Lexend is designed for reading speed.
- OpenDyslexic is meant for readers with dyslexia.
What to watch in concrete terms when choosing (my practice):
- Are I, l and 1 distinguishable? Type them side by side and look.
- Are c, e and o clearly open, or do the curves almost close? Closed shapes are harder to tell apart in poor light.
- How strong is the difference between thick and fine strokes? A very high difference looks elegant and becomes a problem at small sizes.
The font size
The WCAG prescribe no minimum size. They prescribe contrasts that depend on size, and they require that text can be enlarged. That is something different.
The recommendation: at least 16 pixels. That is also the default value of most browsers. The trend is now towards 18 to 24 pixels for body text, depending on the typeface (Rheinwerk, ch. 6.3). On a smartphone, too, 16 pixels is the standard. I advise against reducing to 14 pixels.
Why there is no fixed number: the reading distance differs. To a smartphone it is about 30 cm, to a monitor about 70 cm. Add the reader’s visual acuity and the surroundings. In practice that means: 16 pixels is the lower limit and not the goal. If you waver between 16 and 20 pixels, take 20.
Relative instead of absolute units. Set the base size once and derive everything else relatively from it:
:root {
font-size: 100%; /* respects the user's browser setting */
}
body {
font-size: 1.125rem;
}
The difference is not theoretical. Whoever has set a larger font in the browser still gets the small font when px is used. With rem their setting takes effect.
For the heading levels you need a factor and not individual decisions. With a 16 px base and factor 1.25: H4 = 20 px, H3 = 25 px, H2 = 31 px, H1 = 39 px. Usual factors lie between 1.2 and 1.5.
Line spacing, line length, letter spacing
Here lie the mistakes most often overlooked, because they do not feel like mistakes. The text looks fine.
The WCAG distinguish two levels here:
- Level AAA (rule 1.4.8): lines at most 80 characters long, no justified text, line spacing within a paragraph at least 1.5 times, spacing between paragraphs at least 1.5 times the line spacing. The W3C gives the reason: long lines are a hurdle for some readers because they cannot keep their place. Tightly set lines make it harder to find the next line. And justified text creates uneven word spaces, with “rivers of white” running through the paragraph.
- Level AA (rule 1.4.12): if a user sets spacing themselves, nothing may be lost. More on this below.
The AAA values are not mandatory, but a good yardstick.
Line spacing: I take at least 1.5 times the font size. The longer the lines, the larger the spacing should be, because the eye must jump back at the line end and find the next line. For short lines, for example on the smartphone, it can be smaller.
Line length: at most about 80 characters, on the desktop rather fewer. A block of text across the full width of a large monitor is unreadable even if size and contrast are right. In CSS:
.post p {
max-inline-size: 70ch;
line-height: 1.6;
}
The unit ch follows the character width of the typeface and is therefore the fitting size for this rule.
No justified text. Left-aligned ragged-right is the right choice on the web.
No capitals for longer passages. CAPITAL LETTERS are harder to read, because their shapes differ less, and we read almost only mixed case. For a single word in a button it is acceptable, for a heading borderline, for a paragraph wrong.
No empty paragraphs as spacers. Spacing belongs in CSS, not in empty elements.
What happens when someone enlarges the font
This is the point where websites really break, and the one almost nobody checks. The following rules are all Level AA, which applies to legal requirements:
1.4.4 Resize text. Text must be enlargeable to 200 percent without loss of content or function, with the browser’s means. Buttons remain operable, texts are not cut off.
1.4.10 Reflow. At 400 percent enlargement you may only have to scroll in one direction. The W3C describes this as content at a width of 320 CSS pixels (vertically scrolling content) or a height of 256 CSS pixels (horizontally scrolling content). That corresponds to a starting window of 1280 pixels width at 400 percent zoom. The most honest test is a real smartphone.
1.4.12 Text spacing. If a user sets their own spacing, nothing may be lost. The values at which the page must still work:
| Property | Value |
|---|---|
| Line height | at least 1.5 times the font size |
| Spacing after paragraphs | at least 2 times the font size |
| Letter spacing | at least 0.12 times the font size |
| Word spacing | at least 0.16 times the font size |
The typical break: a button with fixed height whose text runs out at the bottom with larger line spacing, or a tile with fixed height in which the text is cut off.
1.3.4 Orientation. The page must work in portrait and landscape. The orientation must not be nailed down.
The viewport meta tag. A detail with a big effect:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
That is how it belongs. maximum-scale=1.0 or user-scalable=no do not belong in it. MDN describes user-scalable as stating whether a user may zoom the page, and notes that some browsers ignore the lock, for example iOS from version 10. On other devices the lock prevents anyone from zooming in. It stands in many older themes and page-builder exports. This is a case where a single line can make a website unusable for visually impaired users (my experience).
Text in images
A special case that still occurs regularly: text saved as a graphic. An offer banner, a price table as a PNG, an infographic in which the actual statement stands.
What does not work about it (Rheinwerk, ch. 6.6):
- Screen readers do not recognise the text as text. A screen reader is a program that reads the page aloud. What stands there exists for a blind user only if it is also in the alternative text, and there it mostly is not complete.
- When enlarged it goes pixelated and does not follow the user’s spacing settings.
- The contrast does not adapt.
- Search engines do not read it. For findability the text is not there, and for AI systems neither.
The rule is WCAG 1.4.5 (Level AA): use real text styled with CSS instead of images of text. The W3C names as an exception, among others, when a particular presentation is essential to the statement. Text that is part of a logo or brand name is explicitly considered essential by the W3C.
In practice: the company logo may be an image with text. Nothing else. If you need a graphic with text, SVG is the better way, because the text stays text there, scales cleanly and can be coloured with CSS.
How to check it yourself
- The zoom test. Open your page and enlarge it in the browser to 200 percent (in most browsers adjustable in the zoom display). Is everything still there: headings, buttons, menu, forms? Then on to 400 percent: do you have to scroll in two directions?
- The font size test in the browser. In the browser settings raise the default font size and reload your page. If nothing changes, your sizes are fixed in
px. - A look at the viewport tag in the source. Right-click, view page source, search for
viewport. Ifuser-scalable=noormaximum-scalestands there, that is a finding. - The line length. If a line of your body text runs over half the width of a large monitor, it is too long.
- The text-spacing bookmarklet. There are bookmarklets that apply the four spacing values from 1.4.12 to the current page. One click, and you see where text runs out of its box.
What you can do
- Set the base right once, instead of repairing single spots. Font size, line height and line length belong in the basic design and not in single blocks.
- Take the larger variant. With font size, line spacing and paragraph spacing the mistake is almost always on the too-tight side. I have not yet met a client who complained about too much air.
- Avoid fixed heights. Buttons, tiles and boxes should grow with their content. Fixed heights are the most common reason a page breaks with a larger font.
- Check the typeface before it sits in the whole website. Type a real paragraph in the candidate typeface, at the planned size, with digits and the critical letters. Looking at the alphabet at 60 pixels says nothing, that is not how the typeface will be used later.
- For WordPress: if your typefaces are loaded from a foreign server, that is a topic of its own for load time and data protection. There is an article of its own on that.
Sources
- W3C, Understanding SC 1.4.4: Resize Text — text enlargeable to 200 percent, Level AA: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.10: Reflow — 320 × 256 CSS pixels: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.12: Text Spacing — line height 1.5, paragraph spacing 2, letter spacing 0.12, word spacing 0.16: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.8: Visual Presentation — Level AAA: at most 80 characters, no justified text, line spacing 1.5, paragraph spacing 1.5 times the line spacing: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.5: Images of Text — real text instead of images of text, logos as essential, Level AA: w3.org(external site: w3.org)
- W3C, Understanding SC 1.3.4: Orientation — portrait and landscape: w3.org(external site: w3.org)
- MDN, Viewport meta element —
user-scalable,maximum-scale, some browsers ignore the lock: developer.mozilla.org(external site: developer.mozilla.org) - Braille Institute, Hyperlegible fonts — Atkinson Hyperlegible, designed for distinguishable letters: brailleinstitute.org(external site: brailleinstitute.org)
- Rheinwerk, Barrierefreie Webseiten, ch. 6.3 to 6.6 — legibility of characters, readability and look and feel, the typeface groups, the recommendation of humanist sans-serif typefaces, font sizes and reading distances, the heading scale, the four drawbacks of text in images.
- Own testing practice — the CSS values, the remarks on Lexend and OpenDyslexic,
user-scalable=noin older themes, fixed heights as a breaking point, checking the typeface on a real paragraph.