Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which monospace font does a browser use?

With CSS, if you specify font-family: monospace;, my understanding is that the browser chooses its default/preferred monospaced font.

If that's correct, how can you determine which monospaced font your browser is using?

like image 402
nickh Avatar asked May 03 '13 15:05

nickh


People also ask

What is the default monospace font?

Courier is the traditional monospace font.

What is the most popular monospace font?

Fira Code (popular choice) Undoubtably the most commonly used monospace font ever, Fira Code is a spin on Fira Mono. The difference is that Fira Code contains code-specific ligatures (this is when two graphemes/letters are joined together as a single glyph).

What is the default font face of the browser?

When your page is loaded, their browser will display the first font face available. If none of the given fonts are installed, then it will display the default font face Times New Roman. Note − Check a complete list of HTML Standard Fonts.


1 Answers

There are 5 generic families that can be used: "serif", "sans-serif", "cursive", "fantasy", and "monospace". When a browser sees one of those, it asks the operating system for the default font in that family.

Thus, which font a web browser uses is OS-dependent.

See Mozilla's documentation on font-family for details.

like image 143
nickh Avatar answered Oct 22 '22 08:10

nickh