Search within TutorialsPark

CSS outline-color Property


To set the color of the outline.


Definition and Notes.

1. The CSS outline-color property is used to set the color of the outline, it can even have inverted colors to display the outline, despite the background color.

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.


Syntax:

CSS outline-color property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

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

Property Values

Value Description
color To set the color of the outline.Using either of Hex colors, hsla(), rgba() or keywords
invert To invert the colors, making sure that the outline is visible despite the background.
inherit The value of inherit property is inherited from the parent element.

Specifications

Specs Value
Name outline-color
Value <color> | invert
Initial Value invert
Applies to All elements
Javascript syntax object.style.outlineColor="#fa4b2a"
Inherited No
Computed Value Same as declared value
Browser Support internetexplorer safari firefox opera chrome

Related Examples.