CSS text-decoration-line Property
Example
.example1 {
text-decoration-line: overline;
}
.example2 {
text-decoration-line: underline;
}
.example3 {
text-decoration-line: line-through;
}
.example4 {
text-decoration-line: underline overline;
}
Hello World!
Meaning
The text-decoration-line property sets the kind of decoration that is used on text in an element, such as an underline or overline.
When setting multiple line-decoration properties at once, it may be more convenient to use the text-decoration shorthand property instead.
Default value: | none |
Inherited: | No |
Animatable: | No |
Version: | CSS3 |
JavaScript syntax: |
|
Standard Syntax
text-decoration-line: none|underline|overline|line-through|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
none | This is default value. Specifies no line for the text-decoration. |
underline | Specifies that a line will be displayed under the text. |
overline | Specifies that a line will be displayed over the text. |
line-through | Specifies that a line will be displayed through the text. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
text-decoration-line: none;
}