CSS border-top

The CSS border-top property allows you to set all styles of a top border.
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: div.border-style {border-top: 2px dotted #ff9900}
Try it yourself!