CSS outline

CSS Outline Properties

An outline is a line that is drawn around elements, outside the border edge, to make the element "stand out".

The CSS outline properties sets the outlines around elements. You can specify the style, color, and width of the outline.

Note:
Outlines do not take up space, and they do not have to be rectangular.

Browser support:
IE: Internet Explorer, F: Firefox, N: Netscape.

W3C:
The number in the "W3C" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).

Property Description Values IE F N W3C
outline A shorthand property for setting all the outline properties in one declaration
outline-color


outline-style


outline-width


- 1.5 - 2
outline-color Sets the color of the outline around an element
color




invert
- 1.5 - 2
outline-style Sets the style of the outline around an element none


dotted


dashed


solid


double


groove


ridge


inset


outset







- 1.5 - 2
outline-width Sets the width of the outline around an element thin


medium


thick


length


- 1.5 - 2