CSS text-decoration-style Property
In CSS, the text-decoration-style property is used to specify the text-decoration of an element. The text-decoration property combines the properties text-decoration-line, text-decoration-style, and text-decoration-color.
If the specified decoration has a specific semantic meaning, such as a line-through line indicating that some text has been deleted, authors are encouraged to use an HTML tag, such as <del> or <s>, to indicate this meaning. Because browsers can disable styling in some cases, semantic meaning will not be lost in such a case.
When adjusting multiple line-decoration properties at once, the text-decoration shorthand property may be more convenient.
Syntax
Property Values
Value | Description |
---|---|
solid | The default value. The line will only be displayed as a single line. |
double | The line will appear as two lines. |
dotted | The line will appear as a dotted line on the screen. |
dashed | The dashed line will be displayed. |
wavy | The line will be displayed as wavy. |
initial | This property is set to its default value. |
inherit | This property is inherited from its parent element. |
Supported Browsers
Property | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
text-decoration-style | 57.0 | 36.0 6.0 -moz- | 12.1 | 79.0 | 44.0 |