Typography
Most of an interface is text. Four choices decide whether it reads well: size, line height, line length and the font itself. Get those right before touching anything else.
A small, fixed scale
Pick a handful of sizes once and use only those. When every size from 10 to 24 pixels appears somewhere, nothing looks deliberate and every new screen means a new decision. Ours has six. The sizes are chosen by eye rather than by a ratio, and neighbors are far enough apart that the difference is obvious.
Display
56px · 1.08 · 600 — Marketing headlines only.
Heading 1
32px · 1.15 · 600 — One per page.
Heading 2
20px · 1.35 · 600 — Sections. Usually the last heading level you need.
Body
16px · 1.65 · 400 — Anything people read in full.
Label
14px · 1.43 · 500 — Buttons, inputs, menus. The most common UI size.
Secondary
13px · 1.54 · 400 — Hints and metadata, in the muted color.
Most screens need three of these at once: one for the title, one for the content, one for supporting detail. If you find yourself reaching for a fourth heading level, the structure is probably too deep.
Line length
Aim for 45 to 75 characters per line, with about 65 as the default. In CSS that is roughlymax-width: 65chon anything people read in full. Wide layouts can stay wide; the paragraphs inside them should not.
Line length decides how hard the eye works. At the end of each line, it travels back to the left edge and has to land on the right line. Make that trip too long and readers lose their place; make it too short and they spend their attention on the jumps instead of the words.
Comfortable: long enough to keep rhythm, short enough to find the next line.
Line height shrinks as size grows
Small text needs room between lines so the eye can find the next one. Large text does not: a headline at 1.6 looks like separate lines floating apart. Body text sits around 1.6, labels around 1.4, headings between 1.1 and 1.3. Longer lines want a little more, shorter lines a little less.
Hierarchy without shouting
Size is only one way to rank text, and the clumsiest. Weight and color do most of the work. Two weights are enough: regular for reading, semibold for emphasis. Two or three text colors are enough: full contrast for what matters, muted for supporting detail, and a faint one reserved for placeholders and disabled text.
When something does not stand out enough, try quieting what competes with it before making it bigger. And let importance, not the HTML tag, decide how big a heading looks; plenty of section titles behave like labels and should be small.
Details that add up
Use tabular numbers wherever digits change or line up, so prices and counters do not wobble. Align mixed sizes on their baseline, not their center. Tighten letter spacing only on large headings, and loosen it only for short runs of capitals. Use bold or italic, never both, and use either sparingly. Keep text left-aligned unless it is two lines or fewer.
Further reading
This guide draws on Robert Bringhurst’s The Elements of Typographic Style, Matthew Butterick’s Practical Typography, Refactoring UI by Adam Wathan and Steve Schoger, and the type systems published by Material, GitHub Primer and Vercel Geist.