The Style textDecorationStyle property in HTML DOM is used to set the line. It can display the line in various styles like a single line, double line, wavy etc. By using this property we can display the line in specified style.
- It returns the textDecorationStyle property.
- It is used to set the textDecorationStyle property.
object.style.textDecorationStyle = "solid|double|dotted|dashed| wavy|initial|inherit"
- solid:This property used to display line as a single line.This is a default value.
- double:This property used to display line as a double line.
- dotted:This property used to display line as a dotted line.
- dashed: This property used to display line as a dashed line.
- wavy:This property used to display line as a wavy line .
- intial: It sets the textDecorationStyle property to its default value.
- inherit:This property is inherited from its parent element.
- It returns string that represents a textDecorationStyle property of a element.
- Before Click on the button:
- After Click on the button:
Supported Browsers: The browser supported by DOM Style textDecorationStyle property are listed below:
- Google Chrome 57.0
- Firefox 36.0
- Opera 44.0