CSS border top color is used to set the color of top border of an HTML element.
Syntax
1 |
border-top-color: specify color here; |
1 2 3 4 5 6 7 8 9 10 11 12 |
<style> .div-border{ border-top-width:2px; border-top-style:solid; border-top-color:#000; } </style> <div class="div-border"> <p>This is the HTML paragraph to show the example of border top color CSS property.</p> </div> </body> </html> |
Output
This is the HTML paragraph to show the example of border top color CSS property.
CSS border top color values list
Sr. No. | value | Description |
---|---|---|
1 | border-width | Used to give color of border. The value for this can be hex, rgba() or color name in text format. Check CSS border color for more detail. |
2 | initial | Used to define as the property initial value. |
3 | inherit | Used to define the computed value of property on the elements parent. |