What CSS property specifies the style of a border?
Answer
border-style
Answer
border-style
The CSS property that specifies the style of a border is `border-style`.
It controls how an element’s border is drawn, using values such as `solid`, `dashed`, `dotted`, `double`, `groove`, and `none`. The property is a shorthand covering the top, right, bottom, and left border-style properties, so one declaration can define all four sides.
The main mix-up is with the other border properties. `border-width` controls thickness, `border-color` controls color, and `border` is a shorthand that can combine width, style, and color in one declaration. A border generally needs a visible style before it appears; the default border style is `none`, even if a width or color has been supplied.
CSS also permits one to four `border-style` values. One value applies to every side; two divide values between vertical and horizontal sides; three map to top, horizontal sides, and bottom; four follow the clockwise top-right-bottom-left order.
Source: Wikipedia · fact-checked Sept. 2026