Style borderStyle Property
Style borderStyle Property
The borderStyle property is used to either set or return the style of an element border. It has the following types:-
- One value specifies border styles for all four sides.
- Two values will specify one border style for top and bottom borders and the other style for left and right borders.
- Three values will specify the first style for the top border, a second style for the left and right borders, and a third style for the bottom border.
- Four values will specify the style for all four sides from the top, right, bottom, and left sides of the borders.
Its syntax is:- object.style.borderStyle OR object.style.borderStyle = value
Its return is:- string having style of an element border
Value | Description |
---|---|
none | Defines no border. |
hidden | The same as none. |
dotted | Defines dotted border |
dashed | Defines dashed border |
solid | Defines solid border |
double | Defines two borders. |
groove | Defines 3D grooved border. |
ridge | Defines 3D ridged border. |
inset | Defines 3D inset border. |
outset | Defines 3D outset border. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |