The border
property is a shorthand for setting the width, style, and color of a border in one line.
The border-color
property sets the color of the border. You can specify a color for all sides or set a different color for each side.
The border-radius
property creates rounded corners. You can specify the radius for all corners or set different values for each corner.
The border-style
property defines the style of the border. Common styles include solid
, dashed
, dotted
, and double
.
CSS allows you to set borders individually on each side (top, right, bottom, left). For example, you can use border-top
, border-right
, etc.
When setting borders, you can combine border-width
, border-style
, and border-color
in a shorthand property like this:
border: 3px dotted #3498db;