CSS Outline-Width Property

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

Outline-width is used to specify the width of outline. You can easily understand about this property because its name indicates that this property can set the width of outline. You can set the width of outline as thick, thin, px, cm etc.

Values of outline-width property
Values Description
thin Used to create thin width of outline
thick Used to create thick width of outline
medium Specifies medium width
length You can set the width in px, pt, cm etc.
initial Specifies the default value of the element

Example of outline-width property

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

Output:-
example of outline-width property
SUMMARY

In this chapter, you have learned about the outline-width property of CSS so you can set the width of outline according to your requirement and create an attractive web page. Click on Next button to continue -

 

Share your thought