untitled

(John Hannent) #1

Using the Font-Variant for Small Caps ........................................................


The small-capsvalue is a specialized variant on normal letters. It creates cap-
ital letters that are about 75 percent the size of the normal capitals. This isn’t
used often, but it looks good when you need it. You’ll see it most often when
the terms AD or BC are used to indicate dates, as in the following example.

<html>
<head>

<style>

em.smallcaps {font-style: normal;font-variant: small-caps;}

p {font-size: x-large;}

</style>
</head>

<body>

<p>
These vases were created around 4000 <em
class=”smallcaps”>b.c.</em>Before glazing was
invented.
</p>

</body>
</html>

The result looks like this:

These vases were created around


4000 BC. Before glazing was invented.


Notice that the BC is displayed in capitals, but compare the B to the size of
the normal B in the word Before.

Simple Font-Style ...........................................................................................


The font-styleproperty has only three possible values: normal, italic,
and oblique. Because italic is generally used only to emphasize a word or

96 Part II: Looking Good with CSS

Free download pdf