CSS Outline-Color Property

In this chapter you will learn:
About outline-color property
Values of outline-color property
Example of outline-color property

CSS outline-color property is used to specify the color of outline so that it looks attractive. It is supported in all major browsers. You can set the color of outline-style as you set the color of elements line in a normal form (color name), hexadecimal form (#ff00ff) etc.

Values of outline-color property-
Values Description
invert It is the default value of outline-color which is used to specify color inversion.
color It is used to specify the color of outline
initial Used to specify the default value of the property
iherit Inherited from parent element

Example of outline-color property

<html>
<head>
    <title>Example of outline-color property</title>
    <style type="text/css">
         div
        {
            border:3px dotted red;
            outline-style:dashed;
            outline-color:blue; 
        }    
   
    </style>
    </head>
<body>
<div> This is the example of outline-color property of css.</div>
</body>
</html>

Guide:-

When you run the given code then it will display the outline of division and the color of the outline will blue in dashed form.


Output:-
example of outline-color property
SUMMARY

In this chapter you have learned about the outline-color property so now you can create an attractive outline of the element. Some other properties are given in next chapter so click on Next button to continue-

 

Share your thought