CSS Property outline-color

This property sets the color for the visible portions of the overall outline of an element.


Initial value invert
Inherited No.
Version CSS2
JavaScript syntax object.style.outlineColor="#00FF00"
Applies to All elements.

CSS Syntax

outline-color: color | invert | inherit 

Property Values

The property values are listed in the following table.

Value Description
color Set the color.
invert Default value. Set color inversion to make the outline visible.
inherit Specifies that the outline color should be inherited from the parent element

Browser compatibility

outline-color Yes 8.0 Yes Yes Yes


An example showing how to use outline-color CSS property.

<!DOCTYPE html>
p {<!-- w  w  w. j a  va 2 s  .com-->
    border:1px solid red;


Click to view the demo