outline-color - HTML CSS CSS Property

HTML CSS examples for CSS Property:outline-color

Description

The outline-color CSS property sets the color of the outline of an element.

The following table summarizes the outline-color Property.

Item Value
Default value: invert
Applies to:All elements
Inherited: No
Animatable: Yes.

Syntax

The syntax of the property is as follows:

outline-color:      color | invert | initial | inherit

Property Values

The following table describes the values of this property.

Value Description
color Set the outline color.
invert Performs a color inversion on the pixels of the screen to ensures that the outline is visible. This is default.
initial Sets this property to its default value.
inherit take the value of its parent element outline-color property.

The example below shows the outline-color property.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS outline-color property</title>
  <style type="text/css">
    p {<!--from  w  w w  .j  a  v  a2  s .  c om-->
        outline-style: solid;
        outline-color: #0000ff;
    }
</style>
 </head>
 <body>
  <p>This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. </p>
 </body>
</html>

Related Tutorials