CSS outline-color property

CSS Outline outline-color Property

Description

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

Possible Values

  • color − Any valid color value.
  • invert − The outline inverts the color of the drawn area.


Applies to

All HTML elements.

DOM syntax

object.style.outlineColor = "red"; 

Example

This is an example:

<html> 
<head> 
</head> 

<body> 
<p style = "outline-width:thin; outline-style:solid;outline-color:red"> 
This text is having thin solid red outline. 
</p> 
<br /> 

<p style = "outline-width:thick; outline-style:dashed;outline-color:#009900"> 
This text is having thick dashed green outline. 
</p> 
<br /> 

<p style = "outline-width:5px;outline-style:dotted;outline-color:rgb(13,33,232)"> 
This text is having 5x dotted blue outline. 
</p> 

</body> 
</html> 

This will produce the following result −

CSS outline-color property

Leave a Reply

Your email address will not be published. Required fields are marked *