Style borderTopColor Property
The Style object
Definition and Usage
The borderTopColor property sets or returns the color of an element's top border.
Syntax
Set the borderTopColor property:
Object.style.borderTopColor="
color
|transparent|inherit"
Return the borderTopColor property:
Object.style.borderTopColor
**Tip:** The borderTopColor property has no default value.
| Value | Description |
|---|---|
| color | Specifies the color of the top border. In A CSS color value the CSS color reference you can find a complete list of possible color values. |
| transparent | The color of the top border is transparent (the underlying content shows through). |
| inherit | The color of the top border is inherited from the parent element. |
Browser support





All major browsers support the borderTopColor property.
**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".
Example
Example
Change the color of the top border:
This is some text.
Try it »
The Style object