Interview Questions

Which font names are available on all platforms ?

CSS Interview Questions and Questions


(Continued from previous question...)

118. Which font names are available on all platforms ?

The simple answer is "None" which is why CSS offers five generic font names as 'serif', 'sans-serif', 'cursive', 'fantasy' and 'monospace'. Never put any of these generic font names in quotes.

A CSS aware browser should make a suitable choice from the available fonts in response to each of those generic names.
Specifying any other font name in a www environment comes out as a suggestion only, that may or may not be acknowledged by a browser.
The problem with using names of specific fonts is that there is little point in naming fonts that few users will have, so you're down to listing a few mass-market font names. This will then override any superior selection that a minority of discerning readers may have made for themselves.
Note also that fonts may differ in their character repertoire, but this is often not evident from the font name itself: by selecting an inappropriate font name, you might prevent internationalized content from displaying correctly for a proportion of users.

(Continued on next question...)

Other Interview Questions