CSS text-decoration | html text color css
ExampleSetthecolorofthetext-decorationtored:p{ text-decoration:underline; text-decoration-color:red;}TryitYourself»[1]DefinitionandUsageThetext-decoration-colorpropertyspecifiesthecolorofthetext-decoration(underlines,overlines,linethroughs).Tip:Alsolookatthetext-decoration[2]property,whichisashort-handpropertyfortext-decoration-line,text-decoration-style,text-decoration-color,andtext-decoration-thickness.Showdemo❯[3]Defaultvalue:currentColorInherited:noAnimatable:yes.Readaboutanimatable[4]Tr...
ExampleSet the color of the text-decoration to red:
p { text-decoration: underline; text-decoration-color: red;}
Try it Yourself »[1] Definition and UsageThe text-decoration-color property specifies the color of the text-decoration (underlines, overlines, linethroughs).
Tip: Also look at the text-decoration[2] property, which is a short-hand property for text-decoration-line, text-decoration-style, text-decoration-color, and text-decoration-thickness.
Show demo ❯[3]
Default value: currentColor Inherited: no Animatable: yes. Read about animatable[4] Try it[5] Version: CSS3 JavaScript syntax: object.style.textDecorationColor="red" Try it[6] Browser SupportThe numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -moz- or -webkit- specify the first version that worked with a prefix.
Property ...