A Complete Guide to Web Design

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

The Tag


Web Design in a Nutshell, eMatter Edition

specifying precise display information, so these physical tags may fall by the
wayside.
Table 7-2 lists the available physical inline style tags with their uses. Refer to the
“Summary of Text Tags” at the beginning of this chapter for complete browser-
support information.

The Tag


The<font>tag is an inline style tag used to specify the size, color, and font face
for the enclosed text using thesize,color, andfaceattributes, respectively. A
single<font> tag may contain all of these attributes as shown:
<FONT FACE="sans-serif" COLOR="white" SIZE="+1">
For an explanation of acceptable values for the color attribute, refer to “Specifying
Colors in HTML” in Chapter 5,HTML Overview.
It should be noted that the<font>tag with all its attributes has been deprecated
by the World Wide Web Consortium due to the fact that style sheets are now
available and are considered superior for controlling presentation. It is still
supported, but may become obsolete in future versions of HTML.

Table 7-2: Physical Inline Style Tags

Tag Description Function
<b> Bold Displays text in bold type
<big> Big Displays type one size larger than the
surrounding text (equivalent tosize="+1")
<blink> Blink Makes the text flash on and off (Netscape Navi-
gator only)
<font> Font Specifies the font face, size, and color (discussed
in “The <font> Tag” section later in this chapter)
<i> Italic Displays text in italic type
<s> Strike-through An alternative tag for<strike>(newer browsers
only)
<small> Small Displays type one size smaller than the
surrounding text (equivalent tosize="-1")
<strike> Strike-through Displays strike-through text (crossed through
with a horizontal line)
<sub> Subscript Displays the text at a smaller size, slightly below
the baseline of the surrounding text
<sup> Superscript Displays the text at a smaller size, slightly above
the baseline of the surrounding text
<tt> Teletype Displays the text in the user’s default mono-
spaced font
<u> Underline Underlines the text