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



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.