CSS font stacks, media style sheets & web standards

Your banner ad here

WestNIC provides reliable web hosting services

Site navigation below

CSS fonts should be based on a generic font family to ensure an appropriate style font is rendered in any circumstances. Preferred font names should be declared in order of preference in a comma separated font family list tailored for specific platforms.

CSS font family: monospace

Monospace fonts have a fixed width like typewriters and often have strong angular or block serifs. Monospace font faces are often used code samples and have a simple, functional font style. Use the CSS font family name monospace.

The most common monospace fonts

The only monospace font that is likely to be present on all systems is Microsoft Courier New, which is relatively common on all platforms. However, the original Courier font on which it is based is more common on Mac and Unix family systems. Andale Mono is also available on Windows, Mac and Unix family systems, but is far less common.

Monospace font names may indicate the style of lettering, with suffixes "console", "typewriter", "mono" and "fixed".

Most common monospace fonts on Windows systems to 6 March 2010
Font name Installed (%) Sample Image
Courier New 99.56% 99.56% Text Image
Lucida Console 99.12% 99.12% Text Image
OCR A Extended 58.88% 58.88% Text Image
Consolas 56.93% 56.93% Text Image
Lucida Sans Typewriter 36.10% 36.10% Text Image
Bitstream Vera Sans Mono 26.13% 26.13% Text
Andale Mono IPA 4.03% 4.03% Text
Andale Mono 3.63% 3.63% Text Image
OCRB 3.28% 3.28% Text
Monaco 2.74% 2.74% Text
Monotype.com 1.05% 1.05% Text Image
Terminal 0.98% 0.98% Text Image

Font stack builder: Start a monospace font stack

Most common monospace fonts on Mac systems to 6 March 2010
Font name Installed (%) Sample Image
Monaco 99.43% 99.43% Text Image
Courier 98.85% 98.85% Text Image
Courier New 91.67% 91.67% Text Image
Andale Mono 90.23% 90.23% Text Image
Lucida Sans Typewriter 67.58% 67.58% Text
Bitstream Vera Sans Mono 15.29% 15.29% Text
Consolas 11.62% 11.62% Text
Monotype.com 0.61% 0.61% Text

Font stack builder: Start a monospace font stack

Most common monospace fonts on Unix systems to 6 March 2010
Font name Installed (%) Sample Image
Nimbus Mono L 95.63% 95.63% Text Image
DejaVu Sans Mono 94.04% 94.04% Text Image
Courier 10 Pitch 83.33% 83.33% Text
Bitstream Vera Sans Mono 83.13% 83.13% Text Image
Lucida Sans Typewriter 77.86% 77.86% Text Image
FreeMono 73.88% 73.88% Text Image
Liberation Mono 72.77% 72.77% Text
Courier New 66.25% 66.25% Text
Andale Mono 59.06% 59.06% Text
Courier 41.88% 41.88% Text Image
Luxi Mono 30.94% 30.94% Text Image
Fixed 21.56% 21.56% Text Image
Lucida Typewriter 11.06% 11.06% Text
Terminal 9.38% 9.38% Text
DejaVu LGC Sans Mono 7.69% 7.69% Text
Vera Sans Mono 4.68% 4.68% Text
Monaco 2.29% 2.29% Text

Font stack builder: Start a monospace font stack

Font stacks for print style sheets

Our main interest is to build reliable font stacks for screen rendering, but CSS allows us to specify a different font stack to print Web pages. The most reliable way to apply print media style sheets is to use the media attribute on the style sheet link element. The selectors you choose and font-family declarations you add to this style sheet will only apply when the page is printed.

<link rel="stylesheet" type="text/css"
      href="/styles/print.css" media="print" />
    

What font combinations would you choose for print? Use the font stack builder to create a print font stack and submit your ideas.

Other CSS font family resources

Web font survey and sampler

Contribute to the survey and discover the new Web safe fonts.

Web font foundations

Font jargon: CSS font family glossary

Find fonts: Anchor Points: Font foundries & sources

Get the sampler font code: Sampler.css

Article feedback

Your comments on this article will be appreciated, please use the form below to submit your views. If you would like a reply or article update notification, include your email address.

Information: Your email address will not be mis-used. If you include your address you may be sent a personal reply, you will not be added to any mailing list unless you request update notification. Read the site privacy statement for details.

Add this page to your chosen social bookmarking service

Style warning - please read

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