CSS/Properties/text-decoration
From W3C Wiki
< CSS | Properties
Contents |
text-decoration
The text-decoration property describes decorations that are added to the text of an element using the element's color.
Description
| Values | none | [ underline || overline || line-through || blink ] | inherit |
|---|---|
| Initial value | none |
| Applies to | All elements |
| Inherited | No |
Point, Note
- The decoration's color be set by the color property.
Values
none
Produces no text decoration.
underline
Each line of text is underlined.
overline
Each line of text has a line above it.
line-through
Each line of text has a line through the middle.
blink
Text blinks (alternates between visible and invisible).
inherit
Takes the same specified value as the property for the element's parent.
Example
Example A
[style.css]
p#no{ text-decoration: none; }
p#un{ text-decoration: underline; }
p#ov{ text-decoration: overline; }
p#th{ text-decoration: line-through; }
p#bl{ text-decoration: blink; }
[index.html]
<body> <p id="no">This is a paragraph(none)</p> <p id="un">This is a paragraph(underline)</p> <p id="ov">This is a paragraph(overline)</p> <p id="th">This is a paragraph(line-through)</p> <p id="bl">This is a paragraph(blink)</p> <body>
CSS Reference
The CSS specification defines the text-decoration property in 16.3.1 Underlining, overlining, striking, and blinking.

