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-

 

Share your thought