Saturday, January 17, 2009

CSS Generic Fonts

When specifying fonts through CSS using the "font-family" attribute, you might have users who can't display some of the text correctly when they don't have the font you are using. Sure, you can provide multiple fonts with a comma separated list, but does it have to be so hard?

CSS provides 5 generic fonts that you can provide at the end of the CSS list so you don't have to list every font in existence just to get your page to display in a particular way. The 5 generic fonts are: cursive, fantasy, monospace, sans-serif, and serif.

No comments: