Style border Top Property

Style border Top Property


Style border top Property
It defines the width, line style, and color of the top border of a box. It is a shorthand property for setting the border-top-width, style, and color.
It is used to set the border-top-color, top-width and top-style of an element.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
 
Property
 
chrome
 
firefox
 
microsoft edge
 
opera
 
border-top
 
1.0
 
1.0
 
4.0
 
3.5
 
Syntax
border-top: border-width border-style border-color|initial|inherit;
For example
Output
 
Property Values
 
Value
 
Description
 
border-top-width
 
It specifies the width of the top 
border. The default value is medium.
 
border-top-color
 
It specifies the style of the top borders. The default value is none.
 
border-top-style
 
It specifies the color of the top border. The default value is the color of the text.
 
initial
 
Sets this property to its default value.
 
inherit
 
Inherits this property from its parent element.
 
Technical Details
 
Default value:
 
medium none color
 
Version:
 
CSS1
 
Inherited
 
no
 
Animatable
 
yes
 
JavaScript syntax:
 
object.style.borderTop="3px double violet"