untitled

(John Hannent) #1
Font families are, not surprisingly, specified in CSS rules using the font-
familyproperty. If you want all paragraphs in your document to use the
Arial typeface, you create the rule like this:

p {font-family: arial;}

Some font names have a space in them, such as Times New Roman or
Showcard Gothic. In those cases (and also if the name includes any symbols
such as % or @), you should enclose the name in single quotes, like this:

p {font-family: ‘Showcard Gothic’, arial;}

Types of Type ................................................................................................


Fonts fall into two primary categories, based on whether or not they have
curlicues and varied line widths. Take a look at Figure 5-2, which illustrates
the sans serif style of fonts — the plainer style with fixed line widths and
plain line ends.

Now consider Figure 5-3, the serif style, that looks a bit more like handwriting
because, like characters drawn with a pen, the line widths vary and the ends
of the lines taper off to a point or a blob:

The distinction between serif and sans serif is quite stark in the letter I. As
you can see by comparing Figures 5-2 and 5-3, the sans serif version is like a
simple brick. The serif version is more like a roman column, flared at the top
and bottom and tapered.

Uniformly thick lines No fancy
curls on the
ends of lines

Figure 5-2:
Sans serif
fonts, like
Arial, have
lines that
don’t vary in
width, and
the ends of
lines don’t
flare — they
stop
abruptly.

Chapter 5: All About Text 87

Free download pdf