Sets the background color behind an object.
![]() |
Syntax
| HTML |
|---|
<element BGCOLOR="" ... > |
| JavaScript |
|---|
Property values
sColor-
A String that specifies one of the color names or RGB values in the Color Table.
Standards information
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
Remarks
JavaScript supports the entire set of colors as color names and as the corresponding RGB values. However, JavaScript always returns the property as a string specifying the RGB color value, regardless of the format the value was set to.
Some browsers do not recognize color names; but all browsers should recognize RGB color values and display them correctly.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
See also
- col
- colGroup
- Reference
- background
- bgColor
Build date: 11/28/2012
