HTML | DOM Style outline Property Last Updated : 08 Aug, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report The Style outline property in HTML DOM is used to set or return all outline properties in one declaration. This property draws a line around an element. It sets or returns the one or more border property in short form. The outline can be set the following properties: outline-widthoutline-styleoutline-color Syntax: It returns the outline property.object.style.outlineIt is used to set the outline property.object.style.outline = "width|style|color|initial|inherit" Return Values: It returns a string value that represents the outline width, style and/or color of an element Property Values: width:It sets the outline width.style:It sets the style of outline.color:It sets the color of the outline.Initial: It sets the DOM outline property to its default value.Inherit: The element inherits its property from parent element. Example 1: Add a thick solid blue outline around the div container. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Style outline Property </title> </head> <body> <div id = "container"> <h1>GeeksforGeeks</h1> <h2>DOM Style outline Property</h2> </div> <script> function myGeeks() { document.getElementById("container").style.outline = "thick solid blue"; } myGeeks(); </script> </body> </html> Output: Example 2: Add a length dashed green outline around the div container. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Style outline Property </title> <style> #container { border: 3px solid black; outline: 3px solid blue; } </style> </head> <body> <div id = "GFG"> <h1>GeeksforGeeks</h1> <h2>DOM Style outline Property</h2> </div> <button onclick = "myGeeks()"> Click Here! </button> <!-- script to set outline style --> <script> function myGeeks() { document.getElementById("GFG").style.outline = "7px dashed green"; } </script> </body> </html> Output: Before Click on the button: After Click on the button: Supported Browsers: The browser supported by DOM Style outline property are listed below: Google Chrome 1Edge 12Internet Explorer 8Firefox 1.5Opera 7Safari 1.2 Comment More infoAdvertise with us Next Article HTML | DOM TableData Object C ChinkitManchanda Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Style backfaceVisibility Property The backfaceVisibility property is the deciding factor that would make an element visible or invisible when the element is not facing the screen. This property is helpful when an element is rotated, and its backside needs to be hidden. Syntax: Return the backfaceVisibility property:object.style.back 3 min read HTML | DOM HTML Object The HTML Object property in HTML DOM is used to represent or access the HTML <html> element with in the object. The <html> element is used to return the HTML document as an Element Object. Syntax: It is used to access a <html> element.var x = document.getElementsByTagName("HTML")[0 3 min read HTML | DOM IFrame Object The IFrame Object property in HTML DOM is used to create and access the <iframe> element within the object. An inline frame is used for embedding another document within the current HTML document. Syntax:It is used to access a <iframe> element.var x = document.getElementById("myframe");I 3 min read HTML | DOM Input Color Object The Input Color Object property in HTML DOM is used to create and access the <input> element within the object. The <input> is used to enter data in the input field. Declaration of input control that allow user to input data is can be done by <input> elements are used within a < 3 min read HTML | DOM TableData Object The TableData object in HTML DOM is used to represent the HTML td element. The td element can be accessed by using getElementById() method. Syntax: To Access td Element: document.getElementById("id");To Create td Element: document.createElement("td"); TableData Object Properties: PropertyDescription 3 min read HTML | DOM Input Number Object The Input Number Object in HTML DOM is used to represent an HTML input element with type= "number". The input element with type= "number" can be accessed by using getElementById() method. Syntax: It is used to access input number object.document.getElementById("id");It is used to create input elemen 3 min read HTML | DOM Style overflowY Property The Style overflowY property in HTML DOM is used to specify the behavior of the content when it overflows an element's top and bottom edges. The content may be hidden, shown or a scrollbar according to the value. Syntax: It returns the overflowY property.object.style.overflowYIt is used to set the o 6 min read HTML | DOM Object Object The Object object represents only HTML <object> element. We can access any <object> element by using the getElementById(); and also can create object element by using createElement(); method.Syntax: It is used to access Object element document.getElementById("id"); It is used to create o 2 min read HTML DOM Window localStorage Properties HTML DOM Window localStorage Properties allow you to store value pairs in web browsers using objects. It is a read-only property. This object is not expired even if the browser is closed. So, the data is never lost. Return Values: It returns  a Storage object. Syntax: SAVING data to localStorage usi 2 min read HTML DOM Style transform Property The HTML DOM style transform property is used to transform the object. The transform property allows to rotate, scale, move, skew, etc of an element. It can use 2D or 3D transformation. SyntaxIt returns the transform property.object.style.transformIt sets the transform property.object.style.transfor 3 min read Like