# border-top-width property

The `border-top-width` property specifies a width of a top border. The value of the property is any size units, except percentages, or the keywords `thin` (`2` pixels border), `medium` (`4` pixels border) or `thick` (`6` pixels border). Default value: `medium`.

## Syntax

`selector { border-top-width: value; }`

## Example

Let's set a top border to one pixel width:

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

:

## See also

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

← →
↑
en ru