David Pierce home | texts

Fonts

This page exemplifies the use of style sheets, with an emphasis on specifing fonts. The reader should of course consult the source of this page, to see how the code there gives the appearance here. The general reference used here for style sheets is the World Wide Web Consortium page Style Sheets in HTML documents; the reference for fonts is their page Cascading Style Sheets, level 1. (Most of the links below are to points within these pages.)

General text properties need no further specification beyond the following HTML tags:

(A full list of phrase elements is on the page just cited.)

The effect of emphasizing and strongly emphasizing text as above is generally that of the tags <I> and <B> which put text in italic and boldface respectively. One can also use <TT> to put text into a teletype or fixed-width (monospace) font. (End tags required for all of these.) See Font style elements.

Monospace is also an example of a generic font family. The other generic families are:

Within a font family, there are font styles, namely:

Another possible distinction within a font family is the font-variant distinction between:

The present page uses an external style sheet for certain formatting features (the margins, mainly). I am using style information in the header, and also in-line style information to specify fonts and colors. (Note that each way of providing style information can have the same result.)

Probably your browser does not properly interpret the distinctions just mentioned within generic font families. One could try to avoid this problem by naming specific font families and not just generic ones.

For example, [my] Netscape Navigator lists many possibilities for the fixed-width and variable-width default fonts. Also Netscape Composer lists fonts. I am calling on some of them here, having picked them more or less at random; however, my Navigator lacks many of the fonts that Composer lists:

"Valid HTML 4.0!"