Change the color of the line, in an underlined text:
The textDecorationColor property specifies the color of the text-decoration (underlines, overlines, linethroughs).
Note: The textDecorationColor property will only have an effect on elements with a visible text-decoration.
The textDecorationColor property is not supported in any of the major browsers.
Firefox supports an alternative, the MozTextDecorationColor property.
Return the textDecorationColor property:
Set the textDecorationColor property:
Value | Description |
---|---|
color | Specifies the color of the text-decoration |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | currentColor |
---|---|
Return Value: | A String, representing the text-decoration-color property of an element |
CSS Version | CSS3 |
CSS reference: text-decoration-color property