HTMLTableRowElement: bgColor property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The **HTMLTableRowElement.bgColor** property is used to set the background color of a row or retrieve the value of the obsolete [bgColor](/en-US/docs/Web/HTML/Reference/Elements/tr#bgcolor) attribute, if present.
توجه: This property is deprecated and CSS should be used to set the background color. Use the {{cssxref("background-color")}} property instead.
Value
One of the following value types can be used:
- a named color, like
redorblue - a hex code, like
#0000dd
توجه: 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 {{cssxref("background-color")}} page.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("HTMLTableCellElement.bgColor")}}