Skip to content
Quillyst
All posts

Typography for the web, from first principles

Measure, rhythm and scale — the timeless rules behind text that is a pleasure to read on any screen.

Leo Martinez1 min read

Good typography is invisible. Readers don’t notice it — they just keep reading. Bad typography is noticed immediately, even by people who couldn’t tell you why. These are the principles that make the difference.

Measure: line length

The ideal line holds about 60–75 characters. Shorter lines feel choppy; longer ones make it hard to find the start of the next line.

.prose {
  max-width: 68ch;
}

Rhythm: line height and spacing

Body text reads best with a line height around 1.5 to 1.8. Headings need less, around 1.1 to 1.3, because they are short and large.

Keep vertical spacing consistent by deriving it from the base line height instead of picking numbers by eye.

Scale: sizing headings

Use a modular scale — each step multiplies the previous one by a ratio such as 1.25. It produces sizes that feel related rather than random.

Make it fluid

clamp() lets the scale grow with the viewport without breakpoints:

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
}

Contrast and weight

Pair a confident heading weight with a comfortable body weight. Avoid pure black on pure white for long reads; a very dark grey on an off-white is gentler on the eyes.

The final check

Read your page on a phone, in sunlight, at arm’s length. If it’s still comfortable, you’ve done it right.

Related

Keep reading

View all posts

Type to search across all articles.