• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Text Properties > text-decoration Property

10.6. text-decoration Property

The text-decoration property enables Web authors to set “decorative” properties to their text displays. This does not mean, as you might first think, that you can add such things as curlicues or baroque fluting to the individual letters in your text. Instead, text-decoration is designed to let you add underlines, overlines or strikethroughs to your text, or even make your text blink on and off.

The text-decoration property can take any one of five keyword values: blink, line-through, overline, underline and none. The blink value is analogous to setting text within the <blink> tag, first instituted in the original version of Netscape Navigator. This tag is considered “infamous” by many, as there is no control over the rate of blinking, and over time it is guaranteed to annoy the user reading the page. Unfortunately, the text-decoration property offers no extra control over the rate or duration of blinking. The line-through value behaves in the same way as the little-used <s> tag, which puts a line through the text. Struck-through text is universally recognized to indicate that edits to the text have been made. The overline value adds a line above the text being displayed, and has no HTML tag equivalent. The underline value works in the same way as the little-used <u> tag, placing a line underneath the text. Caution should be used when using this value, as some users may mistake it for a hyperlink, which is also typically underlined. The none value, which is the default, can also be put to good use. It can remove the underline normally associated with hyperlinks, so that if you have a need for such a thing, it can easily be accomplished using this value. All of these values are used in Listing 10.6, and the results can be seen in Figure 10-6.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint