HTML and CSS Reference
In-Depth Information
p.intro em { font-weight: bold; }
li:first { font-weight: 900; } /* the bolder the better */
FoNT VAriANT
he font-variant property is basically for deining small-caps text. Here are a
couple examples:
h3.post-title { font-variant: small-caps; }
#outline dt { font-variant: normal; }
FoNT SizE
he font-size property provides a wide range of values to specify how big the
characters should appear. It can be given in pixels or as a named, relative, or
absolute size value. he named sizes are like clothing sizes:
xx-small
x-small
small
medium
large
x-large
xx-large
Relative values include the keywords smaller and larger ; length values using
the em , ex , and px units; and percentages. he absolute size values are lengths of
inches (in) , centimeters (cm) , millimeters (mm) , points (pt) , or picas (pc) .
he medium value should be about 16 pixels, although that may vary among
browsers, especially browsers on mobile devices. Example 3.5 displays a num-
ber of diferent font sizes using the : before pseudo-element to self-describe
each span element. his trick will not work with older versions of Internet
Explorer. Figure 3.5 shows how this code displays in my Firefox browser.
Example 3.5: HTML source code for displaying font size values
<!DOCTYPE html>
<html>
<head>
<title>Example 3.5</title>
<style type="text/css">
 
 
 
Search WWH ::




Custom Search