
Much of the Web Design is dealing with text, in paragraphs, headlines, lists, menus, and forms. As a result, the CSS properties are essential to making the difference between a site that looks thrown together and one that looks like it has the professional touch. More than any other factor, type makes the clearest visual statement about the quality of your site's offerings. Graphics are the icing on the cake; typography is where good design begins.
To specify a font, you can use any acceptable length units, both absolute and relative, to specify font sizes, but it's best to use a relative measurement such as ems.
Example: body {font-family: sans-serif;}
Values: serif, sans-serif, monospace, fantasy, cursive
The simplest way to specify fonts in CSS is by using the five generic collection names - serif, sans-serif, nonospace, fantasy, and cursive. These generic names cause the user agent (browser, smartphone, mobile phone, ans so on) to serve up one of these font types. Generic collection names represent the lowest level of support for font styling, and as you will see in a moment, CSS offers some better options than these.
If you want to specify a generic font, you write a declaration like this
body {font-family:sans-serif;}
It's the most basic way to specify a font.
It is accepted practice to write a CSS declaration specifying a number of either serif or sans-serif fonts starting with the one you prefer first and ending with a generic font name such as serif or sans-serif, like this:
body {font-family: "trebuchet ms", helvetica, arial, sans-serif;}
It is very important to make the last item of a font-family declaration a generic declaration of either serif or sans-serif as a final fallback. This ensures that, at a minimum, your document at least displays in the right type (no pun intended) of font.
Also Vista, the Microsoft operating system, comes with a new collection of what I call the "VistaC" fonts, for obvious reasons, which are based on Microsoft's ClearFont technology: Calibri, Cambria, Candara, Consolas, Constantia, and Corbel. By adding these fonts first, Vista users will see them, and other operating systems will fall back to the second and third string fonts as you specify.