Style textDecorationColor Property
Example
Change the color of the line, in an underlined text:
document.getElementById("demo").style.textDecorationColor = "red";
Try it Yourself »
Description
The textDecorationColor property specifies the color of the text-decoration (underlines, overlines, linethroughs).
Note: The textDecorationColor property will only have effect on elements with a visible text-decoration.
Browser Support
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 | 7.1 Webkit | 44.0 |
Syntax
Return the textDecorationColor property:
object.style.textDecorationColor
Set the textDecorationColor property:
object.style.textDecorationColor = "color|initial|inherit"
Property Values
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 |
Technical Details
Default Value: | currentColor |
---|---|
Return Value: | A String, representing the text-decoration-color property of an element |
CSS Version | CSS3 |
Related Pages
CSS reference: text-decoration-color property
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.