Skip to content

System fonts and font stacks explained

Last checked 24 November 2026

A font stack is a list of fonts in your CSS, in the order you'd like them tried. If the first one isn't available, the browser moves down the list.1

And yes, you can skip font files entirely. Use a system font and there's nothing to download.

What a font stack looks like

It lives in the font-family setting. Commas separate the names, and each one is an alternative. The browser settles on the earliest font it either has installed or can fetch with @font-face.1

How a browser reads a font stackTry your first-choice fontTry the next font in the listTry the system fontFall back to the generic family
It works down the list and stops at the first font it can use.

Rules for writing one:

  • Put your first choice first. That might be a web font or an installed font.
  • Add one or two close stand-ins. Pick fonts with a similar feel and width, so the page doesn't change much if the first is missing.
  • End with a generic family. Any font on your list might be missing from a reader's device.1 Generic names such as serif and sans-serif should be the last item in the list.1
  • Quote names with spaces. It's good practice to quote family names that contain white space, digits or punctuation other than hyphens. Generic names are never quoted.1

What a system font is

A system font is the default font the user interface of a person's device uses.2 Because it's already installed, the font doesn't need to be downloaded.2

In CSS you ask for it by name: font-family: system-ui. Glyphs (the letter shapes) are then taken from the default user interface font on that platform.1

MDN adds a warning. system-ui is meant to make UI elements look like native apps, not for typesetting large paragraphs of text. It may give some users a typeface they find undesirable. For large paragraphs, MDN says to use sans-serif or another non-UI font family instead.1

The catch is that system fonts typically vary by operating system and version.2 A phone and a laptop will show different letter shapes. Your page will look slightly different for different readers.

Skipping the file: pros and cons

What you gain

  • Nothing to download. The font is already on the device.2
  • Less to wait for. With no file to fetch, there's no web font that can arrive late. For the delays that do happen, see [page:font-display-and-flash-of-text].

What you give up

  • Control over the look. You can't know which letter shapes each reader sees.
  • A shared brand look. Your heading style can't match across every device.

When it's a good fit

  • Body text, with a caveat. web.dev says system fonts can work particularly well here.2 MDN advises sans-serif or another non-UI family rather than system-ui for large paragraphs.1
  • Simple reference pages and notes. Plain letters do the job.
  • Pages where speed matters most. Fewer requests, less to wait for. See [page:how-many-fonts-are-too-many].

A common middle path is a web font for headings and a system font such as sans-serif for body text. That keeps the number of downloads small.

Why not just list popular fonts?

Older advice was to pick "web-safe" fonts. The trouble is that only a handful of fonts are available across all common systems. A stack of preferred fonts means more testing to make sure your design works with each one.3 A system font or a single web font is usually less work.

A quick check before you publish

  1. Does the stack end with a generic family?
  2. Are names with spaces in quotes?
  3. Have you looked at the page on a phone and on a computer?
  4. If a web font is in the stack, is the stand-in similar in width?

Next, [page:what-is-a-web-font] shows how the web font part of a stack gets loaded, and [page:web-font-file-formats] covers which file to use.

Cited material

  1. font-family - CSS, MDN Web Docs (Mozilla)
  2. Best practices for fonts, web.dev (Google)
  3. Web fonts - Learn web development, MDN Web Docs (Mozilla)