Definition and Usage
The text-decoration-style property specifies the style of lines drawn by the text-decoration-line property.
Styles such as solid, dashed, dotted, double, and wavy are supported.
Basic Example
Specifies the style of lines used as text decorations.
Formal syntax
selector {
text-decoration-style: solid | double | dotted | dashed | wavy
}
Values
The text-decoration-style property specifies the style of text decoration lines drawn on an element. The following values determine how these lines are drawn.
solid |
The default solid line style. |
|---|---|
double |
A double line style. |
dotted |
A dotted line style. |
dashed |
A dashed line style. |
wavy |
A wavy line style. |
Syntax
/* Keyword values */
text-decoration-style: solid;
text-decoration-style: double;
text-decoration-style: dotted;
text-decoration-style: dashed;
text-decoration-style: wavy;
/* Global values */
text-decoration-style: inherit;
text-decoration-style: initial;
text-decoration-style: revert;
text-decoration-style: revert-layer;
text-decoration-style: unset;
Formal definition
| Initial value | solid |
|---|---|
| Applies to | all elements |
| Inherited | no |
| Percentages | n/a |
| Computed value | specified keyword |
| Animatable | no |
Practical Examples
<p>The text-decoration-style property is set to wavy.</p>
p {
text-decoration: underline;
text-decoration-color: red;
text-decoration-style: wavy;
}
The text-decoration-style property is set to wavy.
Browser compatibility
| Property |
Desktop Chrome
|
DesktopDesktop Edge
|
Desktop Firefox
|
Safari
|
|---|---|---|---|---|
text-decoration-style
|
57 | 79 | 36 | 12.1 |
Specifications
| Specification | |
|---|---|
text-decoration-style
|
CSS Text Decoration Module Level 4 #text-decoration-style-property |
See also
- CSS text-decoration-line Property – Specifies Line Decorations
- CSS text-decoration-color Property – Specifies the Color of Text Decorations
- CSS text-decoration-thickness Property – Specifies the Thickness of Text Decoration Lines
- CSS text-decoration Property – Shorthand for Text Decoration Styling
- CSS text-underline-position Property – Specifying the Positional Basis of Underlines
- CSS text-underline-offset Property – Adjusting Underline Offset