CSS border-top-colorProperty
Property definition and usage instructions.
border-top-color sets the color of the element's top border.
Note:Always declare the border-style property before the border-top-color property. An element must have a border before you can change its color.
| Default value: | not specified |
|---|---|
| Inheritance: | no |
| version: | CSS1 |
| JavaScript Syntax: | object.style.borderTopColor="blue" |
Browser Support
The numbers in the table indicate the first browser version that supports the property.
| Property | |||||
|---|---|---|---|---|---|
| border-top-color | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Property value
| Value | Description |
|---|---|
| color_name | Specifies the border color with a color name (such as red). |
| hex_number | Specifies the border color with a hexadecimal value (such as #ff0000). |
| rgb_number | Specifies the border color with an RGB code (such as rgb(255,0,0)). |
| transparent | Default value. The border color is transparent. |
| inherit | Specifies that the border color should be inherited from the parent element. |
Related Articles
CSS Tutorial:CSS Border
CSS Reference Manual:border-top Property
other extensions