underline in Web pages. Users have been trained that underlined text is a link, so they may click your underlined text expecting it to take them somewhere.
The underline.html code produces a page similar to Figure 2-10.
Figure 2-10: You can underline text with text-decoration.
You can also use text-decoration for other effects, such as strikethrough (called “line-through” in CSS,) as shown in the following code:
C “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
strikethrough.htmlStrikethrough
This paragraph has strikethrough text.
The strikethrough.html code produces a page similar to Figure 2-11.
Figure 2-11: Text-decoration can be used for a strikethrough effect.
Text-decoration has a few other rarely used options, such as
♦ Overline: The overline attribute places a line over the text. Except for a few math and chemistry applications (which would be better done in an equation editor and imported as images), I can’t see when this might be used.
♦ Blink: The blink attribute is a distant cousin of the legendary