CSS Fonts in DHTML

Setting Fonts

The example below sets the font-family and sets a list of fonts separated by commas.

H3 { font-family: times, "new york", palatino, serif; }

Set the font-size as below.

<BODY> { font-size: 12pt; }

Set the font-style as shown below.

<P STYLE="font-style: italic;">

Defining Bold Text

Make bold text by using the font-weight property. Note that not all fonts will have all nine different weights. Another weight will be used if the requested weight is not avaiable.

P B {font-weight: bold; }
B {font-weight: normal; }


Mini-caps can be used to emphasise titles.

THESE ARE NORMAL CAPS and these are mini-caps. Cute aren't they.

Setting Multiple Font values in a Rule

H3 { font: italic small-caps bold 14pt helvatica, arial, sans-serif; }