HTMLTableRowElement: bgColor property
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see thecompatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
TheHTMLTableRowElement.bgColor property is used to set the background color of a row or retrieve the value of the obsoletebgColor attribute, if present.
Note:This property is deprecated and CSS should be used to set the background color. Use thebackground-color property instead.
In this article
Value
One of the following value types can be used:
- a named color, like
redorblue - a hex code, like
#0000dd
Note:The values accepted here are a subset of the CSS color values. You can reuse HTML color values in CSS, but not in the other direction: the unknown colors would appear differently than expected.
Examples
Use CSSbackground-color instead. Anexample is available on thebackground-color page.
Specifications
| Specification |
|---|
| HTML> # dom-tr-bgcolor> |