Home > Chapter Review and Exercises > Chapter 12 Formatting Text > CSS Border Requirements
Only one property value, border-style, is required for a CSS border to display using either individual properties or the border shorthand property.
If you use individual properties, border-style must be set to a value other than none or hidden (e.g., solid, dotted, dashed, etc.).
The border-width and border-color properties have default values of medium and currentColor (the text color), respectively, so they are not strictly required for a border to appear.
However, for a typical, fully controlled border, you often declare all three component values using the shorthand border property:
element {
border: 2px solid black;
}
This single declaration sets the following three values for the border's width, style, and color:
border-width: 2px
border-style: solid
border-color: black
In summary, you need at least the border-style property value to enable a border, but typically all three are provided for complete control.