CSS text decoration color is used to define the color added to the text decoration.
Syntax
1 |
text-decoration-color: enter value for decoration |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<style> h2{ text-decoration-color:red; text-decoration-line: overline; text-decoration-style: wavy; } .div-align{ text-align:justify; text-align-end:right; border:1px solid yellow; border-radius:20px; padding:10px; } </style> <h2>This is the heading</h2> <div class="div-align"> <p>This is the paragraph to show text decoration color.</p> </div> |
Output
This is the heading
This is the paragraph to show text decoration color.
CSS text decoration color values list
Sr. No. | value | Description |
---|---|---|
1 | color | Used to define the color for decoration of the text. The value for this is color in hex, rgba or color text like red, blue etc. |
2 | initial | Used to define as the property initial value. |
3 | inherit | Used to define the computed value of property on the elements parent. |
4 | unset | Used to define the property either acts as inherit or initial, depending on the property if it is inherited or not. |