Border in CSS
The border Property
The CSS border property allows you to add or customize the border of the given element. For adding a border, you need to specify its width, color, and style. There are different ways to add borders. One way is by simply a border property where we can specify its width, style, and color. The other method is to doing everything separately i.e, border-width, border-style, and border-color.
Syntax:-
Its syntax is:-
< style >
element{
border: border-width border-style border-color;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
border-width | Specifies the width of the border. |
border-style | Specifies the style of the border. |
border-color | Specifies the color of the border. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |