HTML and CSS Reference
The border properties are used to format the border around elements. They can be
applied to any element and they do not inherit.
To make the border visible around an element, the border-style property has to be set to
a value other than none , which is the default value.
border-style (1-4) | border-top-style |
border-right-style | border-bottom-style |
none | dashed | dotted | double | groove |
hidden | inset | outset | ridge | solid
The solid border style is the one most commonly used, but there are several other
options for displaying a border, as seen in Figure 17-1 . The hidden value removes the
border and is synonymous with none , except that it also hides shared borders in tables
with collapsed borders.
Figure 17-1. border-style appearances
The border-style property is one of several properties that can be set with one
to four values. When fewer than four values are specified, the border-style value is
duplicated, as shown in Figure 17-2 .
Figure 17-2. 1-to-4-value syntax explained