Handy
Tip: Netscape treats tables completely separate from
the main document. Styles you apply to the BODY section aren't
inherited by your tables unless you also include TR and TD definitions.
|
Bookmark
This Page
Here are some tips when
working with fonts using CSS.
font-family
font-family is the CSS property used to call a font by name. The basic
syntax for fonts look like this: H1 { font-family: helvetica, impact,
sans-serif }
Web browsers interpret this rule by looking at the first font name on
the list (helvetica). If a font with that name is installed on the computer
the browser uses it. If not, it then uses the second font and so on. A
value of sans-serif tells the browser to use whatever its default sans-serif
font is. A good idea is to use more than one font name.
Use as many font names in your list as you want.
This can be very helpful to make your page look as you desire. You can
use uncommon fonts which you would like to use first and then the more
common ones. The browser will look at whatever font the visitor has installed
on their computer and use the first one available.
It's a good idea to always use a generic font name as the last on your
list.
Put quotes around the font name if it consists of more than one word.
Example; Gill Sans:
BODY { font-family: "gill sans", "informal roman", serif }
For inline styles, use single quotes: 'gill sans'
When grouping declarations, make font-family the last one.
H1 { color: blue; margin: 16px; font-family: times, "gill sans",
serif }
Internet Explorer 3 may totally ignore an entire CSS rule if font-family
isn't the last property listed.
Next CSS Tutorial; Controlling
Text Size
|
|
Website
Design
|