HTML | DOM Style textDecorationLine Property Last Updated : 05 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Style textDecorationLine property in HTML DOM used to set the decoration for a line. We can specify any number of decorations for a line. It returns the decoration that is given to the text. Syntax: It returns the textDecorationLine property. object.style.textDecorationLineIt is used to set the textDecorationLine property. object.style.textDecorationLine = "none|underline|overline| line-through|initial|inherit" Property Values: none: This is used to specify no line for text decoration.It is a default value.underline: This is used to specify line under the text.overline: This is used to specify line is displayed over the text.line-through: This is used to specify line is displayed through the text.initial: It sets the textDecorationLine property to its default value.inherit: This property is inherited from its parent element. Return Value: It returns a string representing the text-decoration-line property for an element. Example 1: HTML <!DOCTYPE html> <html> <head> <title>DOM Style textDecorationLine Property </title> <style> #gfg { text-decoration: underline; } </style> </head> <body> <center> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM StylestextDecorationLine Property </h2> <p id="gfg"> A Computer science portal for geeks</p> <button type="button" onclick="geeks()"> Change Decoration </button> <script> function geeks() { // Set overline. document.getElementById("gfg" ).style.textDecorationLine = "overline"; } </script> </center> </body> </html> Output: Before Click on the button: After Click on the button: Example 2: HTML <!DOCTYPE html> <html> <head> <title>DOM Style textDecorationLine Property </title> <style> #gfg { text-decoration: underline; } </style> </head> <body> <center> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM StylestextDecorationLine Property </h2> <p id="gfg"> A Computer science portal for geeks</p> <button type="button" onclick="geeks()"> Change Decoration </button> <script> function geeks() { // Set overline-through. document.getElementById("gfg" ).style.textDecorationLine = "overline line-through"; } </script> </center> </body> </html> Output: Before Click on the button: After Click on the button: Supported Browsers: The browser supported by DOM Style textDecorationLine property are listed below: Google Chrome 57.0Edge 79.0Firefox 36.0Opera 44.0Apple Safari 12.1 Comment More infoAdvertise with us B bestharadhakrishna Follow Improve Article Tags : Technical Scripter Web Technologies HTML HTML-DOM Similar Reads HTML | DOM TouchEvent When a user touches a touch-based device the resulted events are handled by TouchEvent Object. The touch events consist of three types of interfaces i.e. Touch, TouchEvent and TouchList. The single contact point events on a touch-sensitive device are handled by the Touch interface. The events which 2 min read HTML | DOM Storage Event The Storage Event in HTML DOM is used to make change in the storage area in the context of another document. When there is modification in the storage area of the window, a storage event is sent to that window. Syntax: window.addEventListener("storage", script) Example: html <!DOCTYPE html> 1 min read HTML | DOM PageTransitionEvent The PageTrasitionEvent occurs during the time a document is being loaded or unloaded. Syntax: PageTransitionEvent.persisted Property Values: persisted: Returns boolean value whether the webpage was cached or not. Return Value: This property returns True if the document is loaded from a cache or not 1 min read HTML DOM Style display Property The HTML DOM Style display property is used to set or return the display type of an element. It is similar to the visibility property, which displays or hides the element. With a slight difference in display: none, hiding the entire element, while visibility: hidden meaning only the contents of the 3 min read HTML | DOM Input Submit Object The Input Submit object in HTML DOM represents the HTML <input> element with type = "submit" attribute. Syntax: It creates an Input Submit Object.document.createElement("INPUT")It is used to access an Input Submit Object.document.getElementById("id") Property Values: autofocus: It sets or retu 3 min read HTML | DOM Input URL Object The Input URL object in HTML DOM represents an <input> element with type = "url" attribute. The element with type url can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the re 3 min read HTML DOM Window frames Properties The HTML DOM Window frames property in HTML DOM is used to return the frame element in the form of an array object. This property represents all <iframe> elements in the current window. DOM Windowframe is a read-only property. Syntax:window.framesProperties:length property: It returns the numb 2 min read HTML | DOM Window opener Properties The Window opener property in HTML DOM is used to return the reference of newly created windows. This property is used to return the details of the source (parent) window. A window is opened using the window.open() method and closed using the window.opener.close() method. Syntax:window.openerReturn 2 min read HTML | DOM Style transitionTimingFunction property The DOM Style transitionTimingFunction property allows a transition effect to change speed over its duration. Transition effect provides a way to control animation speed when changing properties. Syntax: To set the property:object.style.transitionTimingFunction = "ease|linear|ease-in| ease-out|ease- 2 min read HTML DOM Style textAlign Property The HTML DOM style textAlign property is similar to the text-align property in the CSS. It sets the alignment for the inner content of a block element using HTML DOM. SyntaxWe can use textAlign in two different ways, one to set the alignment, and the other to get the current alignment. Get the valu 3 min read Like