CSS border width is used to give the width of border for HTML element.
Syntax
1 |
border-width: specify width here; |
1 2 3 4 5 6 7 8 9 10 11 12 |
<style> .div-border{ border-width:1px; border-style:solid; border-color:red; } </style> <div class="div-border"> <p>This is the paragraph to show border width property of CSS.</p> </div> </body> </html> |
Output
This is the paragraph to show border width property of CSS.
CSS border width values list
Sr. No. | value | Description |
---|---|---|
1 | width | Used to give width of border. The value for this can be in pixel format or percentage format. |
2 | initial | Used to define as the property initial value. |
2 | inherit | Used to define the computed value of property on the elements parent. |