A Complete Guide to Web Design

(やまだぃちぅ) #1
118 Chapter 7 – Formatting Text

Lists


Web Design in a Nutshell, eMatter Edition

Specifying Fonts with


Internet Explorer 1.0 introduced the proprietaryface="value"attribute to the
<font>tag, which allows you to specify specific fonts for selected text. This
attribute was adopted by Navigator in versions 3.0 and higher (note, it does not
work in Navigator 2.0 or earlier).
The face attribute does not guarantee that the user will see your text in your speci-
fied font. Consider it merely a recommendation. Read “Why Specifying Type is
Problematic” in Chapter 3,Web Design Principles for Print Designers, before glee-
fully sprinkling the<font> tag throughout your documents.
The quote-enclosed value offaceis one or more display font names separated by
commas as follows:
<FONT FACE="Verdana, Arial, sans-serif">block of text</FONT>
The browser looks at the string of font names until it finds one that is installed on
the system and can be used for display. If none of the suggested fonts are
installed, the default font will be used instead.
You can include a generic font family (serif, sans-serif, monospace,
cursive,orfantasy) as the last choice in your list, which allows the browser to
choose any available font within that class should your named fonts not be found.
It’s sort of a last-ditch effort to get something like the font you want, without
leaving it entirely to chance.

<font face> advantages


  • Gives designers some influence over font selection.

  • Degrades acceptably.If the suggested fonts are not found (or if the tag is not
    supported), the text will simply be displayed in the browser’s default font
    specified by the user.


<font face> disadvantages


  • Font specification (and other stylistic control) is better handled by style sheets.
    Because it flagrantly links style information with content, this tag has been
    deprecated by the HTML 4.0 Specification and may be obsolete in future ver-
    sions of HTML.

  • Not viable for specifying non-western fonts.uses simple map-
    ping to match identifying character set numbers to character shapes (“glyphs”)
    that may not translate correctly for the font you select.


Lists


The original HTML specification included tags for five different types of lists:
numbered lists (called ordered lists), bulleted lists (called unordered lists), defini-
tion lists, menus, and directory lists. Since then, directory lists and menus have
been “deprecated” with the recommendation that unordered lists be used for the
same effect. In this section, we’ll look at the structure of each type of list in current
use.