CSS border top Property
CSS border-top Property
The border-top property is a shorthand property. It is used to set all the top border properties in one declaration. The properties are in the following orders:-
- border-top-width
- border-top-style
- border-top-color
Syntax:-
Its syntax is:- border-top: border-width border-style border-color | initial | inherit;
Default Value:-
Its default value is:- medium none color
Further Explanation:-
Value | Description |
---|---|
border-top-width | Required. Specifies the width of the top border. |
border-top-style | Required. Specifies the style of the top border. |
border-top-color | Optional. Specifies the color of the top border. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |