Style backgroundColor Property
Style backgroundColor Property
The backgroundColor property is used to either set or return the background color of an element.
Syntax:-
Its syntax is:- object.style.backgroundColor OR object.style.backgroundColor = color|transparent|initial|inherit
Return:-
Its return is:- string having the background-color
Further Explanation:-
Value | Description |
---|---|
color | Specifies the background color. |
transparent | The background color is transparent. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |