CSS border Property


The border property in CSS is used to style the border of an element. This property is a combination of three other properties border-width, border-style, and border-color as can be used as a shorthand notation for these three properties. It sets or returns the border-width, border-style, border-color Properties.

Syntax:

border = "width style color|initial|inherit"

Property Values:

  • width: This value specifies the weight or the width of the border.
  • style: This value specifies a style for the border, that is whether the border will be dotted, dashed, solid etc.
  • color: This value specifies the color of the border.

Example -