CSS border-left is used to set the left border for an HTML element.
This is a shorthand property with a single setting to specify the width, style and color of the left border.
Syntax
1 |
border-left: border-width border-style border-color; |
1 2 3 4 5 6 7 8 9 10 |
<style> .div-border{ border-left:2px solid #000; } </style> <div class="div-border"> <p>This is left border property example paragraph.</p> </div> </body> </html> |
Output
This is left border property example paragraph.
CSS border left values list
Sr. No. | value | Description |
---|---|---|
1 | border-width | Used to give width of border. The value for this is in px. Check CSS border-width for more detail. |
2 | border-style | Used to give style for border. The value for this can be from none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset. Check CSS border-style for more detail. |
3 | border-color | Used to give color for border. The value for this can be hex color, rbga() and color label. Check CSS border-color for more detail. |
6 | initial | Used to define as the property initial value. |
7 | inherit | Used to define the computed value of property on the elements parent. |