CSS text-decoration-color Property
Example
Change the color of the line, in an underlined text:
p
{
text-decoration: underline;
-moz-text-decoration-color: red; /* Code for Firefox */
text-decoration-color: red;
}
Try it yourself »
Definition and Usage
The text-decoration-color property specifies the color of the text-decoration (underlines, overlines, linethroughs).
Note: The text-decoration-color property will only have an effect on elements with a visible text-decoration.
| Default value: | currentColor |
|---|---|
| Inherited: | no |
| Animatable: | yes. Read about animatable Try it |
| Version: | CSS3 |
| JavaScript syntax: | object.style.textDecorationColor="red" Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -moz- specify the first version that worked with a prefix.
| Property | ||||||
|---|---|---|---|---|---|---|
| text-decoration-color | Not supported | Not supported | Not supported | 6.0 -moz- | Not supported | Not supported |
CSS Syntax
text-decoration-color: color|initial|inherit;
Property Values
| Value | Description | Play it |
|---|---|---|
| color | Specifies the color of the text-decoration | Play it » |
| initial | Sets this property to its default value. Read about initial | Play it » |
| inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
CSS tutorial: CSS Text
HTML DOM reference: textDecorationColor property

