CSS/Properties/outline
< CSS | Properties
Outline
The outline property is a shorthand property, and sets all three of 'outline-style', 'outline-width', and 'outline-color'.
Description
Values | [ <outline-width> || <outline-style> || <outline-color> ] | inherit |
---|---|
Initial value | See individual properties |
Applies to | all elements |
Inherited | No |
Values
inherit
Takes the same specified value as the property for the element's parent.
And see also individual properties
Example
Example A
[style.css]
h1 { outline: 1px solid red; }
[index.html]
<body> <h1>CSS outline property example</h1> </body>
CSS Reference
The CSS specification defines the outline property in 18.4 Dynamic outlines.