CSS Outline
The outline
is a line drawn around elements, outside the border edge, to make the element stand out.
The outline
property specifies the style, color, and width of an element's outline.
Outline
Examples
Drawing a Line Around an Element
CSS Outline
The outline
is a line drawn around elements, outside the border edge, to make the element stand out.
The CSS outline property specifies the style, color, and width of an element's outline.
All CSS Outline
Properties
The numbers in the "CSS" column indicate which CSS version defined the property (CSS1 or CSS2).
Property | Description | Values | CSS |
---|---|---|---|
outline | Sets all the outline properties in one declaration | outline-color<br>outline-style<br>outline-width<br>inherit | 2 |
outline-color | Sets the color of the outline | color-name<br>hex-number<br>rgb-number<br>invert<br>inherit | 2 |
outline-style | Sets the style of the outline | none<br>dotted<br>dashed<br>solid<br>double<br>groove<br>ridge<br>inset<br>outset<br>inherit | 2 |
outline-width | Sets the width of the outline | thin<br>medium<br>thick<br>length<br>inherit | 2 |