background-color

The background-color property sets the background color of an element.

Values

background-color: value
Value Initial Description
color Keyword or a numerical RGB specification
transparent transparent Underlying colors shine through

DOM

object.style.backgroundColor = "value";

Example | color

Example | transparent

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

W3C CSS Backgrounds and Borders Module Level 3