CSS Property outline-color








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

Summary

ItemValue
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




Example

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

<!DOCTYPE html>
<html>
<head>
<style>
p {<!-- w  w  w. j a  va 2 s  .com-->
    border:1px solid red;
    outline-style:dotted;
    outline-color:#00ff00;
}
</style>
</head>

<body>
<p>paragraph.</p>
</body>
</html>

Click to view the demo