Style Object
The borderTop property sets or returns up to three separate border-top properties, in a shorthand form.
With this property, you can set/return:
Set the borderTop property:
Return the borderTop property:
Tip: There is no default value for the borderTop property.
| Parameter | Description |
|---|---|
| width | Sets the width of the top border |
| style | Sets the style of the top border |
| color | Sets the color of the top border |
![]()
The borderTop property is supported in all major browsers.
Change the width, style, and color of the top border:
Style Object
Your message has been sent to W3Schools.