# border-top-style property

The `border-top-style` property specifies a style of a top border. Property values ​​such as in `border-style`.

## Syntax

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

## Example

Let's set a top border type as `dashed`:

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

:

## See also

- the `border-top-color` property
  that sets a color 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