Style borderColor Property
Style borderColor Property
The borderColor property is used to either set or return the color of an element border. It has the following types:-
- One value specifies border colors for all four sides.
- Two values will specify one border color for top and bottom borders and the other color for left and right borders.
- Three values will specify the first color for the top border, a second color for the left and right borders and third color for the bottom border.
- Four values will specify the color for all four sides from the top, right, bottom, and left sides of the borders.
Syntax:-
Its syntax is:- object.style.borderColor OR object.style.borderColor = color|transparent|initial|inherit
Return:-
Its return is:- string having color of an element border
Further Explanation:-
Value | Description |
---|---|
color | Specifies the color of the border. |
transparent | The color of the border is transparent. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |