CSS border properties enable you to define the style, width, and color of a border surrounding an element.
The border-style property specifies the type of border to display, with the following allowed values:
The border-style
property can accept from one to four values, representing the top, right, bottom, and left borders, respectively.
Example
Illustration showcasing various border styles.
p.dotted {border-style: dotted;} p.dashed {border-style: dashed;} p.solid {border-style: solid;} p.double {border-style: double;} p.groove {border-style: groove;} p.ridge {border-style: ridge;} p.inset {border-style: inset;} p.outset {border-style: outset;} p.none {border-style: none;} p.hidden {border-style: hidden;} p.mix {border-style: dotted dashed solid double;} |
Outcome:
Absence of a border.
An invisible border.
Note: Without setting the border-style property, none of the other CSS border properties, which will be elaborated on in the subsequent chapters, will have any impact. |