Style Object
The borderTopColor property sets or returns the color of the top border of an element.
Set the borderTopColor property:
Return the borderTopColor property:
Tip: There is no default value for the borderTopColor property.
| Value | Description |
|---|---|
| color | Specifies the color of the top border. Look at CSS Color Values for a complete list of possible color values |
| transparent | The color of the top border is transparent (underlying content will shine through) |
| inherit | The color of the top border is inherited from the parent element |
![]()
The borderTopColor property is supported in all major browsers.
Note: The value "inherit" is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports "inherit".
Change the color of the top border:
Style Object
Your message has been sent to W3Schools.