HTMLTableRowElement: bgColor property
Deprecated
Avoid using this feature in new projects. Some table styling attributes have no effect. They are superseded by CSS. This feature may be a candidate for removal from web standards or browsers.>
The HTMLTableRowElement.bgColor property is used to set the background color of a row or retrieve the value of the obsolete bgColor attribute, if present.
Note:
This property is deprecated and CSS should be used to set the background color. Use the background-color property instead.
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 CSS background-color instead. An example is available on the background-color page.
Specifications
| Specification |
|---|
| HTML> # dom-tr-bgcolor> |