What is a font stack?
A font stack
is a list of fonts in the order of preference for use on a web site. The font stack provides specific instructions to the web browser for how to make a font substitution
if the web site viewer’s computer does not have a specified font installed. Without a font stack, the browser will choose the font.
Here is a suggestion for what to include in a font stack:
- The font of choice. If the browser can access this font, the page will look as intended.
- An alternative font. A font that is similar to the font of choice so there is as little change to the page design as possible.
- A common Windows or Macintosh font. A font that has a very high likelihood of being installed on either a Windows or Macintosh computer.
- A generic font name in CSS (cascading style sheet). The generic font families in CSS are serif, sans serif, monospaced, cursive, fantasy and script.
is the most common serif font on the web, and the default serif font in most browsers. Arial (PC) and Helvetica (Mac)
are the most common sans serif fonts.