CSS border-top-style

The CSS border-top-style property allows you to set the style of a top border.

Note: You will also need to specify border-top-color and border-top-width before your border-top-style is displayed.

Syntax: border-top-style: <border-style>
Possible Values:
  • none
  • hidden
  • dotted
  • dashed
  • solid
  • double
  • groove
  • ridge
  • inset
  • outset
  • inherit
Initial Value: None
Applies to: All elements.
Inherited: Yes
Media: Visual
Example: div.border-style {border-top-style:dotted}
Try it yourself!