Style outline Property
Style outline Property
The outline property is used to either set or return all the outline properties. An outline is a line around an element and is displayed around the margin of the element. It is actually a shorthand property. Properties included in it are:-
- outline-width
- outline-style
- outline-color
Syntax:-
Its syntax is:- object.style.outline OR object.style.outline = width style color | initial | inherit
Return:-
Its return is:- a string containing outline width, style, and color of an element
Further Explanation:-
Parameter | Description |
---|---|
width | Sets width of outline |
style | Sets style of outline |
color | Sets color of outline |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |