Skip to main content

Typography

UI Design

What is Typography

Typography is the choice and arrangement of type in an interface. It covers the typeface, size, weight, line height, line length and spacing, and it makes text readable and shows what is most important.

Key elements of Typography

UI designers work with:

  • Type scale: A fixed set of sizes for headings, body and labels
  • Line height: About 120-145% of the font size for body text
  • Line length: About 45-90 characters per line
  • Spacing: Kerning, tracking and leading

Typography and accessibility

Text must stay readable for everyone. WCAG asks for a contrast ratio of 4.5:1 for normal text and 3:1 for large text. Layouts must also still work when users increase line height, letter spacing or word spacing.

Why Typography matters

Most interfaces are mostly text, so typography shapes usability as much as looks. A clear type scale creates visual hierarchy and keeps screens consistent.

Frequently asked questions

What is the difference between kerning, tracking and leading?

Kerning adjusts the space between specific pairs of letters. Tracking changes the spacing evenly across a whole word or block of text. Leading is the space between lines of text, called line height in CSS.

What is a good line length for body text?

Butterick's Practical Typography recommends 45 to 90 characters per line, including spaces. Longer lines are tiring to read and shorter lines break the reading rhythm.

How much contrast does text need?

WCAG 1.4.3 (level AA) asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text, which is 18 point or 14 point bold.