Start a project
Letterpress type blocks in a wooden tray with a red thread across them

How to Build a Type System for Your Website

Most websites do not have a type system. They have a font, a few heading sizes someone picked in the first week, and a growing pile of one-off overrides. After two years the blog uses 17px body text, the services pages use 18px, the footer uses 15px, and nobody remembers why. The site still works, but it no longer looks like one brand.

A type system fixes that by turning typography into a small set of decisions you make once and reuse everywhere. Here is how we build one, in the order we build it.

Key takeaways

  • Two typefaces are enough for almost every business website. Often one family is enough.
  • Choose a modular scale ratio (1.2 to 1.333 for most sites) and derive every size from it.
  • Set body text first: 16–20px, 1.5–1.7 line height, 60–75 characters per line.
  • Use fluid sizes with CSS clamp() so headings shrink gracefully on phones.
  • Name styles by role (display, h2, body, caption), document them, and stop adding new ones.

Step 1: Choose the typefaces

Start from the brand, not from a font list. Ask what the type needs to say. A law firm and a skate shop can both use a sans-serif, but not the same one. We usually test three to five candidates on real content from the client’s site, at real sizes, on a phone, before anyone falls in love with a specimen page.

Practical criteria we check for every candidate:

  • Weights. At least regular, medium or semibold, and bold. A variable font covers all of these in one file.
  • Character set. Proper quotes, en and em dashes, currency symbols, accented letters for names, tabular figures for pricing tables.
  • Legibility at 16px. Open apertures, a clear distinction between l, I and 1, and a generous x-height.
  • Licensing. Web licenses are often priced by monthly pageviews. Google Fonts and many open-source families are free; commercial families can run from roughly $50 to several hundred dollars per style or more for a web license. Check before the design is approved, not after.
  • File size. A subset WOFF2 file for a Latin text face is typically 15–40 KB per style. Four static styles can easily cost more than one variable file.

Pairing rule of thumb: contrast or harmony, never “almost the same.” A geometric sans heading with a humanist sans body often looks like a mistake. A serif display face with a neutral sans body reads as a deliberate choice. If you are unsure, use one well-built family in two or three weights. Many of the best-looking sites we know do exactly that.

Step 2: Set the body text first

Body text is what people actually read, and every other size is relative to it. Decide these four values before touching headings:

PropertyTypical rangeOur usual starting point
Font size16–20px18px desktop, 16–17px mobile
Line height1.4–1.71.6 for long-form, 1.5 for UI text
Line length45–80 characters65–70 characters (max-width around 65ch)
Paragraph spacing0.75–1.25em1em below each paragraph

Fonts with a small x-height need to be set larger to feel the same size. That is why 16px in one family can look noticeably smaller than 16px in another. Judge by eye on the actual device, not by the number.

Also set contrast here. WCAG 2.2 AA requires 4.5:1 for normal text and 3:1 for large text (24px regular, or roughly 18.7px bold). Light gray body text on white is one of the most common failures we see. Our WCAG 2.2 guide for marketing websites covers contrast in more detail.

Step 3: Build a modular scale

A modular scale multiplies the base size by a fixed ratio to get each step up. The ratio controls how dramatic the hierarchy feels.

  • 1.2 (minor third): calm, compact. Good for dashboards, documentation, content-heavy sites.
  • 1.25 (major third): the safe default for most marketing sites.
  • 1.333 (perfect fourth): more contrast, editorial feel.
  • 1.5 and up: very expressive. Use only for display sizes or the headings get huge fast.

With an 18px base and a 1.25 ratio, the steps round to: 14.4, 18, 22.5, 28, 35, 44 and 55px. In practice we round to whole numbers and assign roles:

RoleDesktopMobileWeight / line height
Display (hero)55px36px700 / 1.05
H144px32px700 / 1.1
H235px27px650 / 1.15
H328px22px600 / 1.25
H4 / lead22px19px500 / 1.4
Body18px17px400 / 1.6
Small / caption14px14px400 / 1.45

Notice two patterns. Line height gets tighter as size grows, because large text with 1.6 leading looks like it is falling apart. And mobile uses a smaller ratio than desktop, so headlines do not take over the whole first screen.

Step 4: Make it fluid

Instead of jumping between sizes at breakpoints, modern CSS lets each size scale smoothly between a minimum and a maximum with clamp(). An H2 might be defined as clamp(1.7rem, 1.2rem + 2vw, 2.2rem): never smaller than about 27px, never larger than about 35px, and proportional in between.

Two cautions. Always use rem for the minimum and maximum so the text still respects the user’s browser font-size setting. And test zoom to 200%: WCAG requires text to resize without loss of content, and pure vw-based sizes can fail that test.

Step 5: Define the details people skip

The difference between “we picked a font” and “we have a type system” is in the small rules:

  • Letter spacing. Slightly negative (-0.01 to -0.02em) for large headings, zero for body, slightly positive (0.04–0.08em) for all-caps labels.
  • Numbers. Tabular figures in tables and pricing, proportional figures in running text.
  • Links. Underlined in body text. Color alone is not enough for people with color vision deficiencies.
  • Vertical rhythm. Space above a heading larger than space below it, so the heading clearly belongs to the text that follows. A common pattern is 2em above, 0.5em below.
  • Maximum widths. Headings around 20–25 characters per line look intentional; long headlines wrapped over the full container width do not.
  • Loading. Preload the one or two files used above the fold and use font-display: swap, with a fallback font whose metrics are adjusted (size-adjust, ascent-override) to minimize layout shift.

Step 6: Document and enforce

A type system that lives only in a Figma file will drift within months. We ship three things:

  1. Design tokens for every size, weight, line height and letter spacing, named by role (text-body, text-h2), not by value (text-18).
  2. CSS utility or component styles that use only those tokens. If a developer needs a new size, that is a conversation, not a quick inline override.
  3. A one-page reference showing each style with a real example and a note on when to use it. “Lead paragraph: first paragraph of an article or service page, never more than three lines.”

The rule we give clients: if you find yourself needing a ninth text style, check whether one of the existing eight will do. It almost always will.

Typography is a core part of our branding work, and we usually build the type system before we design a single page layout.

FAQ

Is 16px too small for body text?

It is the minimum we would use, not a target. For reading-heavy pages on desktop, 17–20px is more comfortable for most readers, depending on the typeface.

Should I self-host fonts or use Google Fonts?

Self-hosting is usually faster because it avoids an extra connection to a third-party domain, and it gives you full control over caching and subsetting. Many Google Fonts families can be downloaded and self-hosted under their open licenses.

How many font weights do I need?

Three is typical: regular for body, a medium or semibold for UI and subheads, and bold for headings. A variable font gives you everything in between at no extra request.

If your site has accumulated a dozen slightly different text styles and you want to bring them back under control, tell us about it. A type audit is often a quick, high-impact first step.

Join the discussion

Share your thoughts or ask a question

Your email stays private. Comments are moderated before they appear.

Keep reading

All articles