HTML atrybut tabeli bgcolor
Przykłady
Tabela HTML z kolorem tła:
<table border="1" bgcolor="#00FF00">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
Spróbuj »
Pomoc Browser
Wszystkie główne przeglądarki obsługują atrybut bgcolor.
Definicja i Wykorzystanie
HTML5 nie obsługuje <table> atrybut bgcolor. Za pomocą CSS zamiast.
W HTML 4.01, <table> atrybut bgcolor nieaktualne .
bgcolor atrybut określa kolor tła tabeli.
Zgodność Uwagi
W HTML 4.01, <table> the atrybut bgcolor nieaktualne, proszę zamiast użyć CSS.
CSS Składnia: <table style = "background-color: red">
CSS Przykład: Kolor tła tabeli
W naszym poradniku CSS można znaleźć więcej informacji na temat background-color atrybutów szczegółów.
gramatyka
<table bgcolor="color_name|hex_number|rgb_number">
Wartość nieruchomości
值 | 描述 |
---|---|
color_name | 规定颜色值为颜色名称的背景颜色(比如 "red")。 |
hex_number | 规定颜色值为十六进制值的背景颜色(比如 "#ff0000")。 |
rgb_number | 规定颜色值为 rgb 代码的背景颜色(比如 "rgb(255,0,0)")。 |
HTML <table> tag