CSS3 text-decoration-line
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The text-decoration-line
CSS property specifies what kind of line decorations are added to the element. This property can accepts one or more space separated values.
The following table summarizes the usages context and the version history of this property.
Default value: | none |
---|---|
Applies to: | All elements. It also applies to |
Inherited: | No |
Animatable: | No. See animatable properties. |
Version: | New in CSS3 |
Syntax
The syntax of the property is given with:
The example below shows the text-decoration-line
property in action.
Example
Try this code »p {
-moz-text-decoration-line: underline; /* Firefox */
text-decoration-line: underline; /* Standard syntax */
}
p.multiple {
-moz-text-decoration-line: underline overline; /* Firefox */
text-decoration-line: underline overline; /* Standard syntax */
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
none |
Text has no decoration. This is default value. |
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 |
Makes the text blink (alternates between visible and invisible). This value is deprecated in favor of Animations. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element text-decoration-line property. |
Browser Compatibility
The text-decoration-line
property is not supported in most of the browsers.
Basic Support—
|
Warning: The text-decoration-line
property is currently not supported by the most of the browsers. You should better avoid using this property.
Further Reading
See tutorial on: CSS Text, CSS Border.
Related properties: text-decoration
, text-decoration-color
, text-decoration-style
.