Nothing is for sale here. Freewill tips keep the site running. Want to help? → Tip via Paypal
Text Decorations
Text decorations might sound like more fun than they really are, but they are at least useful. The possible values for the text decoration property are:none | underline | overline | line-through
While “none” may not seem like a useful value, it really is. It’s used to remove the default underline from text links. Many people, including me, think the link text is easier to read without the underline, and that links just look better without it.
Be careful about removing the underline from links and also changing the default link color, though. Some people, especially newbies, may not realize the link is a link without one of the normal visual clues.
OK, this next part is going to seem like Captain Obvious material, but if I don’t say it someone won’t get it . . . the underline value underlines text, the overline value creates a line above the text, and the line-through value creates a horizontal line through the center of the text.
There now, that wasn’t so bad, was it? There used to be a "blink" value as well, but few browsers supported it. Know why? It sucked to have constantly flashing text! If you don't believe that just blink your eyes real fast while trying to read this page.
Here’s an example of how to use the text-decoration property and value to remove the underline from links:
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
If you remove the underline from your links, you don’t have to remove the underline from each link state, but most professional web designers do. One decent change up to that norm is to have an underline, or an underline and overline, for the hover state.
Text decorations can be used with any text element. Other uses might include using the underline value to emphasize a word or phrase; or using the line-through to cross out the regular price of an item before offering it at a lower sale price. Here’s how to use an inline style to create a line through the old price of an item on sale:
Sale Price $39.95!
On a web page that looks like this:
Regular price: $49.95
Sale Price: $39.95!