CSS Border-Width Property

In this chapter you will learn:
Border-width property
Examples of border-width property

It is very simple to know about border-width property because the name of this property specifies that you can use this property to set the width of the border of elements or tags.

Examples of border-width property:-
Example 1. border-width of paragraph
<html>
<head>
 <style>
 p
{
      border-style:solid;
      border-width:thick;
     }
</style>
 </head>
<body>
<p>
 This is the example of border-width property.
</p>
 </body>
 </html>

Guide:-
When you run the given program then you will get that the width of the border of the paragraph is thick.
Output:- example of border-width property
Example 2. border-width of div
<html>
<head>
<style>
div
{
      border-style:solid;
      border-width:thick;
        width:100px;
        height:150px;
     }
</style>
 </head>
<body>
<div>
 This is the example of border-width property.
</div>
 </body>
 </html>

Guide:-
When you run the given program then you will get that the width of the border of div is thick.
Output:-
example of border-width property of div

Summary

In this chapter, you have learned how to use border-width property in your program so now try it yourself and 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.