A type scale for websites, from 12 to 72

Eleven sizes from 12 to 72 pixels, each with a line height and a job. Enough for any website, few enough to keep it consistent.

Cheat sheet

A type scale that just works

Aa72

Aa60

Aa48

Aa36

Aa30

Aa24

Aa20

Aa18

Aa16

Aa14

Aa12

Sundry Millsundrymill.com/library
A type scale for websites, from 12 to 72

The eleven sizes

  • Sundry

    12px 0.75rem · line 16px

    xs: Captions, legal lines

  • Sundry

    14px 0.875rem · line 20px

    sm: Labels, table text

  • Sundry

    16px 1rem · line 24px

    base: Body text

  • Sundry

    18px 1.125rem · line 28px

    lg: Lead paragraphs

  • Sundry

    20px 1.25rem · line 28px

    xl: Small headings

  • Sundry

    24px 1.5rem · line 32px

    2xl: Card titles

  • Sundry

    30px 1.875rem · line 36px

    3xl: Section headings

  • Sundry

    36px 2.25rem · line 40px

    4xl: Page headings on phones

  • Sundry

    48px 3rem · line 52px

    5xl: Page headings

  • Sundry

    60px 3.75rem · line 62px

    6xl: Hero on laptops

  • Sundry

    72px 4.5rem · line 72px

    7xl: Hero on big screens

Copy the scale

The scale as CSS variables
:root {
  --text-xs: 0.75rem;    /* 12px */
  --leading-xs: 1rem;
  --text-sm: 0.875rem;    /* 14px */
  --leading-sm: 1.25rem;
  --text-base: 1rem;  /* 16px */
  --leading-base: 1.5rem;
  --text-lg: 1.125rem;    /* 18px */
  --leading-lg: 1.75rem;
  --text-xl: 1.25rem;    /* 20px */
  --leading-xl: 1.75rem;
  --text-2xl: 1.5rem;   /* 24px */
  --leading-2xl: 2rem;
  --text-3xl: 1.875rem;   /* 30px */
  --leading-3xl: 2.25rem;
  --text-4xl: 2.25rem;   /* 36px */
  --leading-4xl: 2.5rem;
  --text-5xl: 3rem;   /* 48px */
  --leading-5xl: 3.25rem;
  --text-6xl: 3.75rem;   /* 60px */
  --leading-6xl: 3.875rem;
  --text-7xl: 4.5rem;   /* 72px */
  --leading-7xl: 4.5rem;
}
Headings that grow with the screen
h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 4.5rem); line-height: 1.05; }  /* 36 to 72 */
h2 { font-size: clamp(1.875rem, 1.4rem + 1.8vw, 3rem); line-height: 1.1; }  /* 30 to 48 */
h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.25; } /* 20 to 24 */
body { font-size: 1rem; line-height: 1.5; }

The font

The samples are set in Satoshi, free from Fontshare.

How to use it

  • Body text at 16 px with a 24 px line height is the safe default. Go to 18 for long reads.
  • Headings get tighter line heights as they grow: 1.5 for body, about 1.2 for 24 to 36, about 1 for 60 and up.
  • These are the same steps Tailwind uses, so the names match if you ever move to it.

When to use it

  • Starting a new site or design system, before any page is designed.
  • Tidying a site where every page has picked its own sizes: 15, 17 and 19 px all in use is a sign.
  • Not as a rule to use every size. Most pages need four or five of the eleven.

A worked example: a blog post page from the scale

Picking five sizes from the eleven for a reading page.

  1. Body text at lg, 18 px on a 28 px line height, because a blog post is a long read.
  2. The post title at 5xl (48 px) on laptops and 4xl (36 px) on phones, with the clamp() line from this page doing the change for you.
  3. Section headings at 2xl (24 px), the date and reading time at sm (14 px), captions at xs (12 px).
  4. That is five sizes. Write them as the CSS variables here and use only those, so the next page you add matches without thinking about it.

Free to use in personal and commercial work. No credit needed, though a link back is always nice.

More from the library

See the whole library