THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Style textDecorationStyle Property

Style Object Reference Style Object

Example

Display a wavy line under the paragraph:

document.getElementById("myP").style.textDecorationStyle = "wavy";
Try it yourself »

Definition and Usage

The textDecorationStyle property sets or returns how the line, if any, will display.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The textDecorationStyle property is not supported in any of the major browsers.

Firefox supports an alternative, 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"

Property Values

Value Description
solid Default value. The line will display as a single line
double The line will display as a double line
dotted The line will display as a dotted line
dashed The line will display as a dashed line
wavy The line will display as a wavy line
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: solid
Return Value: A String, representing the text-decoration-style property of an element
CSS Version CSS3

Related Pages

CSS reference: text-decoration-style property


Style Object Reference Style Object