CSS text-decoration-style property
Example
Display different types of underlines:
div
.a
{
text-decoration-line:
underline
;
text-decoration-style:
solid
;
}
div
.b
{
text-decoration-line:
underline
;
text-decoration-style:
wavy
;
}
div
.c
{
text-decoration-line:
underline
;
text-decoration-style:
double
;
}
div
.d
{
text-decoration-line:
overline
underline
;
text-decoration-style:
wavy
;
}
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| text-decoration-style | 57.0 | 79.0 | 36.0 | ||
| 6.0 -moz- | 12.1 | 44.0 |
Definition and Usage
The text-decoration-style property specifies how the line is displayed.
| Default value: | solid |
|---|---|
| Inherited: | No |
| Animatable: | No. See Animatable. |
| Version: | CSS3 |
| JavaScript syntax: | object.style.textDecorationStyle="wavy" Try it |
CSS Syntax
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
Attribute values
| Value | Description | Testing |
|---|---|---|
| solid | Default. The line is displayed as a single line. | Test » |
| double | The line is displayed as a double line. | Test » |
| dotted | The line is displayed as a dotted line. | Test » |
| dashed | The line is displayed as a dashed line. | Test » |
| wavy | The line is displayed as a wavy line. | Test » |
| initial | Sets this property to its default value. See initial. | Test » |
| inherit | Inherits this property from its parent element. See inherit. |
CSS Reference Manual