Decorating Text

Style sheets let you adorn your text with underlines, overlining, lines through the text (perhaps to indicate changes), and even blinking text.

Figure 10.39. You don't have to restrict underlining, or other text decorations to link elements, as I have done here. They can be applied to any element.

To decorate text:


Type text-decoration:.


To underline text, type underline.

Or, for a line above the text, type overline.

Or, to strike out the text, type line-through.

Or to make the text appear and disappear intermittently, type blink.

To get rid of decorations:


Type text-decoration:.


Type none.

Figure 10.40. I've removed the underlining from both new and visited links. Then, I added underlining to links that are being hovered over to help visitors know that they are links. It's in italics because it's the title of a book.


  • You can eliminate decorations from elements that normally have them (like a, strike, or ins) or from elements that inherit decorations from their parents.

  • Many graphic designers hate underlining and consider it a relic from the typewriter age. While it's perfectly fine to remove underlining from link elements, you'll have to identify the links some other way or nobody will know to click on them.

  • The blink value has a troubled past. Originally designed by Netscape to add pizzazz to Web pages and get an edge over its competition, it was soon scorned by both graphic designers and Internet Explorer, which never deigned to support it. (Firefox and Opera do.)

HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: