X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook