CSS font stacks, developer FAQs & web standards

Your banner ad here

Font stack tips

  • Pick a generic font family first.
  • Put preferred fonts above common ones.
  • Add at least one font for each operating system.
  • Minimise fall through to the generic font family.
  • Bookmark your font stack.

New font stack

Text ad service

Put your text ad here Down arrow icon

WestNIC provides reliable web hosting services

Use the Code Style font stack builder to create robust CSS font-family declarations. The font stack builder shows the probability that your preferred fonts are displayed on Windows, Mac and Linux Web browsers.

Quick start: Build better CSS font stacks

Bookmark: This font stack URL is permanent, you can link to it.

Comment: Send your font stack builder feedback.

Improve your font stack

Add more font families using the selectors below. Click the up and down buttons to re-order the stack. Click the cross button to remove a font from the stack.

Font stack with CSS display probabilities per font, per platform
Font name Windows Mac Linux  
Consolas 64.81% 15.04% 0.00%
Lucida Console 34.90% 0.00% 0.00%
Monaco 0.01% 84.51% 1.79%
monospace 0.28% 0.45% 98.21% What's this?

Get the CSS declaration for this font stack.

Styled with your font stack

This text sample has an inline style rule that uses your font stack, including the generic font family.

What do the font stack percentages mean?

With CSS, if a single person happens to have the first named font installed, the chance that any other font is displayed on their screen will be zero. When you apply this principle to a large number of people like Web users, it is possible to calculate an overall probability that each font in a font stack will be displayed because some people will not have the first font, second or third fallback font. These percentage probability figures therefore equate to the proportion of people whose browsers will display each font in the stack, depending on which operating system they use.

What are the generic font family figures?

A CSS font stack is a priority list where the first matched font is selected, so the overall probability that fonts at the top of the stack are installed and displayed affects the proportion of people whose browsers will display those further down the stack. If the sum probability for all the named fonts is less than 100%, what remains is the probability that an un-specified generic font family will be displayed. In other words, a proportion of users may not match any named fonts and their font selection will fall through to the generic font family.

CSS font family declaration

Click and drag over this font family declaration to select, copy and paste into your style sheet.

font-family: Consolas,
             "Lucida Console",
             Monaco,
             monospace;

Font stack probabilities are based on data from the Code Style font survey for Windows, Mac and Linux operating systems. Special terms apply to the Nuvola icon theme.

Add this page to your chosen social bookmarking service

Style warning, please read

Home · CSS · Java · Javascript · HTML · Help · Log