Font Properties

Cascading Style Sheet Property Reference

provided by: 
Originally published at Internet.com


You can group the font properties using font. You specify the weight, style, size, and family, as in the following example: font: bold normal 12pt times, serif

font-family



font-family is a prioritized list of typefaces for the element. You can specify a single typeface or a list of alternatives, separated by commas, as in the following example: font-family: Courier, Times, Serif

You can use a font name you expect to be on the user's computer, such as Courier or Helvetica, or you can use a generic font name. Table B.11 shows the generic font names and provides an example of a font that looks similar.

Table B.11 Generic Fonts



Name Similar to: serif Times New Roman sans-serif Arial cursive Script fantasy Comic monospace Courier New In case the user doesn't have the font you've requested, always use a generic font name as the last item in the list. In the previous example, serif is the last font in the list. If the user doesn't have courier or times, the browser will use the generic font instead.

If you're using a font name that has multiple words, enclose the font name in quotes, as in the following example: font-family: "Courier New", serif

font-size

...

Read article at Internet.com site

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML