CSS Borders
The CSS border properties allow you to specify the style, width, and color of an element's border.
CSS Borders
The CSS border properties allow you to specify the style, width, and color of an element's border.
Example 1: Border Style
The border-style property specifies what kind of border to display.
A dotted border.
A dashed border.
A solid border.
A double border.
A groove border.
A ridge border.
An inset border.
An outset border.
No border.
A mixed border.
Example 2: Border Width
The border-width property specifies the width of the four borders.
5px border width
medium border width
2px top, 10px right, 4px bottom, 20px left
Example 3: Border Color
The border-color property is used to set the color of the four borders.
Red border
Green border
Multicolor border
Example 4: Border Sides
From the examples above you have seen that it is possible to specify a different border for each side.
Different border styles on different sides.
Example 5: Rounded Borders
The border-radius property is used to add rounded borders to an element.
Normal rounded corners
Rounder corners
Roundest corners