CSS background color Property
CSS background-color Property
The background-color property is used to set the background color of an element. The background of an element is the total size of the element containing padding and border.
Default Value:-
Its default value is transparent.
Syntax:-
Its syntax is:- background-color: color | transparent | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
color | Specifies the background color. |
transparent | Specifies that the background color should be transparent. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |