HTML and CSS Reference
In-Depth Information
Note: Font files that reside on a web server and are made available for
downloading to be used in a web page are called webfonts . All modern
browsers support the use of webfonts to some extent, but there is no com-
mon accepted standard for the file formats.
In the late 1990s, Microsot released a set of core fonts for the Web and
made it available as a free download for both Windows and Macintosh com-
puters. Microsot later ended the free download policy but continued to ship
the core fonts with its operating systems and Oice products. Over time, this
collection of “safe web fonts” has been expanded and today includes Helvetica,
Arial, Arial Black, Times, Times New Roman, Courier, Courier New, Palatino,
Garamond, Bookman Old Style, Avant Garde, Verdana, Georgia, Comic Sans
MS, Trebuchet MS, Impact, Tahoma, and others.
Helvetica is a general-purpose sans serif font with a wide range of appli-
cations. It is one of the most commonly used fonts. Along with Times and
Courier, it was a native font on PostScript printers. Arial is an updated ver-
sion of Helvetica that has been optimized for both screen and print. Times
is a serif font designed for newspaper text. Times New Roman is an updated
and optimized version of Times that is better for screen reading. Courier and
its updated cousin, Courier New, are monospace fonts that provide the feel of
typewritten text. Verdana is a sans serif font with wide lowercase letters, mak-
ing it suitable for headlines but generally not for body text. Tahoma is about
halfway between Verdana and Arial. Comic Sans MS has an informal, hand-
drawn feel. Impact and Arial Black are dramatic fonts well suited for titles and
headings.
he following font properties can be speciied in a CSS statement: font-
family , font-style , font-size , font-weight , and font-variant . Here are some
examples in which I've highlighted the properties and values:
p { font-family: Arial, Helvetica, sans-serif; }
h3 { font-style: italic; }
ul { font-size: 1.2em; }
p.alert { font-weight: bold; }
h4 { font-variant: small-caps; }
he font-family property takes a comma-delimited string of names. he
irst name is the preferred font to be used, and the remaining names are suc-
cessive fallbacks in case a font is not resident on the reader's device. Authors
 
Search WWH ::




Custom Search