CSS Property: background-color
[this page | pdf | back links]
The CSS (CSS1) background-color property sets the
background colour of an element. The background of an element includes its
padding and border but not its margin. Usually, a background colour and
text colour should be chosen in tandem to make the text easy to read.
Valid property values
(other than inherit
and initial) are:
|
Value
|
Description
|
|
color
|
Specified CSS colour
|
|
transparent
|
(default value).
Transparent
|
|
Default Value:
|
transparent
|
|
JavaScript syntax:
|
e.g. object.style.backgroundColor="red"
|
|
Inherited:
|
No
|
|
Animatable:
|
Yes
|
NAVIGATION LINKS
Contents | Prev | Next | CSS Properties