HTML | DOM Style outlineColor Property
The DOM Style outlineColor Property is used to sets or returns the color of the outline around an Element.
- It is used to Return the outlineColor property
- it is used to Set the outlineColor property
object.style.outlineColor = "color|invert|initial|inherit"
- 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.
Output: Before Clicking On Button:
After Clicking On Button:
- 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 above
- Edge 12 and above
- Internet Explorer 8 and above
- Firefox 1.5 and above
- Opera 7 and above
- Safari 1.2 and above