CSS Border-Color Property

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

CSS border-color property is used to specify the color of the border of the element or tag to display the scope of the element in a different look and feel. It helps to create an attractive web page.

Example of this property:-

Example 1. border-color of paragraph


<html>
<head>
<style type="text/css">
p
{
      border-style:solid;
      border-color:Blue;
}
</style>
</head>
<body>
<p> This is the example of border-colorproperty of css.
</p>
</body>
</html>

Output:- example of border-color property Note:-

Border-color property can only work if you have used a border-style property of the tag/element.

Example 2. border-color of div
<html>
<head>
<style type="text/css">
div
{
      border-style:solid;
      border-color:green;
        width:200px;
        height:160px;
}
</style>
</head>
<body>
<div> This is the example of border-color property of css.
</div>
</body>
</html>

Output:- example of border-color property of div

Summary

In this chapter, you have learned about the border-color property of CSS which will help you to create an attractive web page. Click on next button to continue-

More Articles

 

Share your thought