# border-top-color property

The `border-top-color` property specifies a color of a top border. The value of the property is any color units. Default value: same color as the block text has.

## Syntax

`selector { border-top-color: color; }`

## Example

Let's set the top border to red:

`<div id="elem"></div>` `#elem { border-top-color: red; border-top-width: 1px; border-top-style: solid; background: #f9f9f9; width: 300px; height: 100px; }`

:

## See also

- the `border-top-style` property
  that sets a style of a top border
- the `border-top-width` property
  that sets a width of a top border
- the `border-top` property
  that sets a top border
- the `border-width` property
  that sets a width of all sides of a border

← →
↑
en ru