CSS text-decoration-color Property
Example
Set the color of the text-decoration to red:
p
{
text-decoration: underline;
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).
Tip: Also look at the text-decoration property, which is a short-hand property for text-decoration-line, text-decoration-style, text-decoration-color, and text-decoration-thickness.
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.
Property | |||||
---|---|---|---|---|---|
text-decoration-color | 57 | 79 | 36 | 12.1 | 44 |
CSS Syntax
text-decoration-color: color|initial|inherit;
Property Values
Value | Description | Play it |
---|---|---|
color | Specifies the color of the text-decoration | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
CSS tutorial: CSS Text Decoration
HTML DOM reference: textDecorationColor property