New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →


Shorthand property for border-top-width border-top-style and border-top-color.

border-top: 4px dotted red;

The order is important:

  • width
  • style
  • color

border-top: 2px solid;

Only the color is optional. If you omit it, the color applied will be the color of the text.