CSS Border-Top Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

A shorthand property used to specify the color, style, and width of the top border of an element.

Syntax

border-top: [border-style1] [border-style2] ...

Possible values

  • [border-width]
  • [border-style]
  • [border-color]
  • inherit

Initial Value

See individual properties

Applies To

All elements

Inherited

No

Media

Visual

Example

H2 {border-top: 3px dotted #6699FF;}


View All CSS Properties