HTML and CSS Reference
In-Depth Information
Name
text-decoration
Values:
none
| [
underline
||
overline
||
line-through
||
blink
]
Initial value:
none
Applies to:
All elements
Inherited:
No
Computed value:
Same as declared value
Description:
Defines text-decoration effects such as underlining. These decorations will span descendant
elements that don't have decorations of their own, in many cases making the child elements
appear to be decorated. Combinations of the values are legal. Any time two
text-decoration
declarations apply to the same element, the values of the two declarations are notcombined.
For example:
h1 {text-decoration: overline;}
h1, h2 {text-decoration: underline;}
Given these styles,
h1
elements will be underlined with no overline because the value of
un-
derline
completely overrides the value of
overline
. If
h1
should have both overlines and
underlines, use the value
overline underline
for the
h1
rule and move it after the
h1, h2
rule or extend its selector to raise its specificity.
User agents are not required to support
blink
.