border
is a shorthand for
border-width
, border-style
,
and border-color
. It is used to set
an element's border.
The default values of these properties are:
Let's look at some examples, to understand it further:
Now, let's try removing these properties one by one:
Removing the value thin
makes the border width medium
, which is its default value.
Let's remove the border color property red
.
The color goes back to its default value which is the color of the text of the element.
Finally, let's try removing the border style property dashed
:
This removes the border completely, as the default value is border-style: none
.