Search within TutorialsPark

CSS outline Property

A shorthand to set outline in a single declaration

Definition and Notes.

1. The CSS outline property is a shorthand to set outline-color, outline-style ans outline-width in a single declaration

2. Visually, its similar to a border, but it occupies no space( doesn't gets added to width or height). The values are applied to all four edges.


CSS outline property. internetexplorer safari firefox opera chrome

View in Splitscreen»


Note- The purpose of this property is to highlight certain items on the webpage.

Property Values

Value Description
<outline-color> To set the color of outline
<outline-style> To set the style of the order.
<outline-width> To set the width of the outline
inherit The values are inherited from the parent element.


Specs Value
Name outline
Value <outline-color> || <outline-style> || <outline-width>
Initial Value Not defined for shorthand properties
Applies to All elements
Javascript syntax"5px solid #fa4b2a"
Inherited No
Computed Value See Individual Properties
Browser Support internetexplorer safari firefox opera chrome

Related Examples.