warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\inetpub\Websites\DevGuru\www\includes\common.inc(1762) : eval()'d code on line 1.

CSS2 » Properties » background-color

Version: Level 1

Compability:  IE4+  N4+

Syntax:
background-color : color | transparent
transparent
The transparent value allows the background color to be visible through the foreground images. This is how an area inside any character, such as the white space inside this O, is the same as this white background.
color
The color value can be the keyword color name, the hex six-digit number (#FFFFFF), or the rgb three-digit value (255,255,255). There are sixteen standard colors in html:
 
aqua
#00FFFF
rgb(0,255,255)
gray
#808080
rgb(128,128,128)
silver
#C0C0C0
rgb(192,192,192)
navy
#000080
rgb(0,0,128)
black
#000000
rgb(0,0,0)
green
#800000
rgb(128,0,0)
teal
#008080
rgb(0,128,128)
olive
#808000
rgb(128,128,0)
blue
#0000FF
rgb(0,0,255)
lime
#00FF00
rgb(0,255,0)
white
#FFFFFF
rg

The background-color property allows you to select the background color. Since, you can assign the background-color to individual elements, you can have more than one background color on a page. This property is not inherited.

Examples

Code:
p {background-color:  silver}
br {background-color:  rgb(223,71,177) }
body {background-color:  #98AB6F}
pre {background-color:  transparent}
Language(s): CSS2
Code:
<span style="background-color: yellow;">A yellow background</span>
Output:
A yellow background
Language(s): CSS2

See Also: