Style textDecorationStyle Property
Example
Display a wavy line below a paragraph:
document.getElementById("myP").style.textDecorationStyle="wavy";
Try it »
Definition and Usage
The textDecorationStyle property sets or returns how the line is displayed.
Browser support

Almost all major browsers do not support the textDecorationStyle property.
Firefox supports an alternative property, the MozTextDecorationStyle property.
Syntax
Return the textDecorationStyle property:
object
.style.textDecorationStyle
Set the textDecorationStyle property:
object
.style.textDecorationStyle="solid|double|dotted|dashed|wavy|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| solid | Default. The line is displayed as a single line. |
| double | The line is displayed as a double line. |
| dotted | The line is displayed as a dotted line. |
| dashed | The line is displayed as a dashed line. |
| wavy | The line is displayed as a wavy line. |
| initial | Sets this property to its default value. See initial. |
| inherit | Inherits this property from its parent element. See inherit. |
Technical Details
| Default value: | solid |
|---|---|
| Return Value: | A string representing the element's text-decoration-style property. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:text-decoration-style property
The Style object