asp.net.ph

Skip Navigation Links

BGCOLOR Attribute | bgColor Property

Language References


Sets or retrieves the background color behind the object.

Syntax


Inline <element bgcolor = strColor...>
Script object.bgColor = strColor ]

Possible Values


strColor String that specifies one of the color names or red-green-blue ( RGB ) values in the Color Table. Note Specifying the color as a color name may not be recognized by some browsers, whereas the RGB color value should always be displayed accurately.

The property is read/write with no default value.

Remarks

This attribute has been deprecated in favor of the CSS background-color property.

JScript® ( compatible with ECMA-262 language specification ) supports the entire set of X11 colors both as color names and 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.

Applies To

COL, COLGROUP, MARQUEE, TABLE, TBODY, TD, TH, TR

See Also

background



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note