BGCOLOR

HTML (DHTML)

BGCOLOR Attribute

Internet Development Index

Sets the background color behind the object.

Syntax

HTML <ELEMENT BGCOLOR=sColor ... >
ScriptingN/A

Possible Values

sColorString that specifies one of the color names or RGB values in the Color Table.

Remarks

Microsoft® JScript® supports the entire set of colors as color names and as their corresponding RGB values. However, JScript 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.

Standards Information

This attribute is a Microsoft extension to HTML Non-Microsoft link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

COL, COLGROUP

See Also

background, bgColor