text-decoration-color - HTML CSS CSS Property

HTML CSS examples for CSS Property:text-decoration-color

Description

The text-decoration-color CSS property sets the color of the text-decoration-line (underlines, overlines, linethroughs) set on the element.

The following table summarizes the text-decoration-color Property.

Item Value
Default value: The current color of the element
Applies to:All elements. It also applies to ::first-letter and ::first-line.
Inherited: No
Animatable: Yes.

Syntax

The syntax of the property is as follows:


text-decoration-color:     color | initial | inherit

Property Values

The following table describes the values of this property.

Value Description
color Set the color of the text-decoration-line.
initial Sets this property to its default value.
inherit take the value of its parent element text-decoration-color property.

The example below shows the text-decoration-color property.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS3 text-decoration-color Property</title>
  <style type="text/css">
  p {<!--   ww w  . jav  a  2s.  c o  m-->
    text-decoration: underline;
    -moz-text-decoration-color: red; /* Firefox */
    text-decoration-color: red; /* Standard syntax */
  }
</style>
 </head>
 <body>
  <p>This is some decoration text.</p>
 </body>
</html>

Related Tutorials