CSS2 » Properties » text-decoration

Version: Level 1

Compability: IE4+  N4+

Syntax:
text-decoration : none |  [ underline &| overline &| line-through &| blink ]
blink
The blink value causes the selected text to flash in and out of view. It is recommended that you use the blink value sparingly. Many people dislike blinking text on a web site.
line-through
The line-through value draws a line through the middle the text. If the text is composed of more than one color, the line-through will be the color of the first element of the text.
overline
The overline value draws a line over the text. If the text is composed of more than one color, the overline will be the color of the first element of the text.
underline
The underline value draws a line under the text. If the text is composed of more than one color, the underline will be the color of the first element of the text.
none
The none value is the default. By declaring none, you can ensure that any previous declaration will not effect the selected text.

The text-decoration property allows you to underline, and/or overline, and/or draw a line through a specified selection of text, and/or cause the text to blink. This property is not inherited.

Examples

Code:
p { text-decoration:  none; }
p { text-decoration:  underline; }
p { text-decoration:  overline; }
p { text-decoration:  line-through; }
pre { text-decoration:  blink; }
q { text-decoration:  underline  blink; }
blockquote { text-decoration:  underline  line-through  blink; }
br {text-decoration:  underline  overline  line-through  blink}
Language(s): CSS2
Code:
The answer is a firm <span style="text-decoration: underline;">NO</span>!
Output:
The answer is a firm NO!
Language(s): CSS2

See Also: