HTML | DOM Style outlineColor Property Last Updated : 10 Jun, 2022 Comments Improve Suggest changes Like Article Like Report The DOM Style outlineColor Property is used to sets or returns the color of the outline around an Element. Syntax: It is used to Return the outlineColor propertyobject.style.outlineColor it is used to Set the outlineColor propertyobject.style.outlineColor = "color|invert|initial|inherit" Property Values: color: It sets the outline color to any valid CSS color.invert: It set the outline color to a color which is inverse of the background, which ensures the outline will always be visible. Note: It is not supported by all browsers.Inherit: It sets the outline color according to outline-color property inherited from its parent element. Return Value: It returns a string value which represent the color of the outline in an element's. Example-1: html <!DOCTYPE html> <html> <head> <title> HTML | DOM Style outlineColor Property </title> <style> #myDiv { border: 1px solid red; outline: green dotted thick; } </style> </head> <body> <h1> Geeks for Geeks</h1> <h2>HTML | DOM Style outlineColor Property</h2> <div id="myDiv">Welcome to Geeks for Geeks.</div> <br> <button type="button" onclick="myFunction()"> Click Here! </button> <script> function myFunction() { // Set outline color. document.getElementById("myDiv") .style.outlineColor = "red"; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Example-2 : html <!DOCTYPE html> <html> <head> <title> HTML | DOM Style outlineColor Property </title> <style> #myDiv { border: 1px solid red; outline: dotted thick; } </style> </head> <body> <h1> Geeks for Geeks</h1> <h2>HTML | DOM Style outlineColor Property</h2> <div id="myDiv" style="outline-color:green;"> Welcome to Geeks for Geeks.</div> <br> <button type="button" onclick="myFunction()"> Click Here! </button> <script> function myFunction() { alert(document.getElementById( "myDiv").style.outlineColor); } </script> </body> </html> Output: Before clicking On Button: After Clicking On Button: Supported Browsers: The browser supported by DOM Style outlineColor Property are listed below: Google Chrome 1 and aboveEdge 12 and aboveInternet Explorer 8 and aboveFirefox 1.5 and aboveOpera 7 and aboveSafari 1.2 and above Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM HTML-Property Similar Reads HTML | DOM TouchEvent altKey Property The TouchEvent altKey property is a read-only property and used for returning a Boolean value which indicates whether or not the "ALT" key was pressed when a touch event was triggered. The TouchEvent altKey property mostly returns false because generally, touch devices do not have an alt key. Syntax 2 min read HTML | DOM MouseEvent screenY Property The MouseEvent screenY property is a read-only property and used for returning the vertical coordinate of the mouse pointer when an event was triggered. Syntax : event.screenY Return Value: It returns a number which represents the vertical coordinate of the mouse pointer in pixels. Below program ill 1 min read HTML | DOM touchcancel Event The touchcancel event is used to execute a script when the touch event gets interrupted. It is considered a good practice to include the touchcancel event to clean up the code if the devices interrupt a touch event at different actions.Supported Tags All HTML elements supported by this event. Suppor 1 min read HTML DOM childNodes Property The childNodes property returns a node's child nodes as a nodeList object. White spaces and comments are also considered as nodes. The nodes are assigned index numbers, starting from 0. Searching and sorting operations can be performed using index number on the node list. Syntax: elementNodeReferenc 2 min read HTML DOM MouseEvent pageX Property The MouseEvent.pageX property returns the horizontal coordinate (in pixels) of the mouse pointer, relative to the entire document (not just the viewport), when a mouse event occurs. This value includes any horizontal scrolling that has been doneSyntax: event.pageXReturn Values: It returns the horizo 1 min read HTML | DOM MouseEvent offsetY Property The MouseEvent offsetY property is a read-only property and is used for returning the y-coordinate of the mouse pointer, relative to the target element. The MouseEvent offsetY property returns a number which represents the vertical coordinate of the mouse pointer, in pixels with respect to the scree 1 min read HTML | DOM TouchEvent ctrlKey Property The TouchEvent ctrlKey property is a read-only property and used for returning a Boolean value which indicates whether or not the "CTRL" key was pressed when a touch event was triggered. It mostly returns false because generally, touch devices do not have a ctrl key. Syntax : event.ctrlKey Return Va 2 min read HTML DOM MouseEvent screenX Property The MouseEvent.screenX property is used to get the horizontal coordinate (in pixels) of the mouse pointer relative to the screen, not the viewport when a mouse event occurs. This value represents the distance from the left edge of the user's screen to the mouse pointer's position.Syntax :event.scree 1 min read HTML | DOM Style fontSizeAdjust Property The fontSizeAdjust property controls better the font size if the first choice of font is not available. It sets or returns the font aspect value of the text. Aspect value is the size difference between the lowercase letter "x" and the uppercase letter "X". Syntax: To set the fontSizeAdjust propertyo 2 min read HTML DOM compareDocumentPosition() Method The DOM compareDocumentPosition() method is used to compare two nodes and it returns an integer describing where they are positioned in the document. Syntax: node1.compareDocumentPosition(node2) Return Value : This return an integer value and their meaning as follows : 1: This means that the two nod 3 min read Like