CSS text decoration style is used to define the style of underlining a text.
Syntax
1 |
text-decoration-style: 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 HTML paragraph inside the div to show right alignment of text. This uses text align property to align the content.</p> </div> |
Output
This is the heading
This is the HTML paragraph inside the div to show right alignment of text. This uses text align property to align the content.
CSS text decoration style values list
Sr. No. | value | Description |
---|---|---|
1 | solid | Used to define the single line decoration of the text. The value for this is solid. |
2 | double | Used to define the double line decoration of the text. The value for this is double. |
3 | dotted | Used to define the dotted line decoration of the text. The value for this is dotted. |
4 | dashed | Used to define the dashed line decoration of the text. The value for this is dashed. |
5 | wavy | Used to define the wavy line decoration of the text. The value for this is wavy. |
6 | initial | Used to define as the property initial value. |
7 | inherit | Used to define the computed value of property on the elements parent. |
8 | unset | Used to define the property either acts as inherit or initial, depending on the property if it is inherited or not. |