Latest web development tutorials

HTML th atrybut bgcolor

HTML tag th Reference Manual HTML <th> tag

Przykłady

komórek nagłówka tabeli, aby dodać kolor tła:

<table border="1">
<tr>
<th bgcolor="#FF0000">Month</th>
<th bgcolor="#00FF00">Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>

Spróbuj »

Pomoc Browser

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Wszystkie główne przeglądarki obsługują atrybut bgcolor.


Definicja i Wykorzystanie

HTML5 nie obsługuje <th> bgcolor atrybut. Za pomocą CSS zamiast.

W HTML 4.01, <th> atrybut bgcolor nieaktualne .

atrybut bgcolor określa kolor tła komórki nagłówka.


Zgodność Uwagi

W HTML 4.01, <th> atrybut zastąpią bgcolor. Za pomocą CSS zamiast.

CSS Składnia: <p style = "background-color: red">

CSS Przykład: aby dodać kolor tła komórek nagłówka

W naszym poradniku CSS można znaleźć więcej informacji na temat background-color atrybutów szczegółów.


gramatyka

<th bgcolor="color_name|hex_number|rgb_number">

Wartość nieruchomości

描述
color_name 规定颜色值为颜色名称的背景颜色(比如 "red")。
hex_number 规定颜色值为十六进制值的背景颜色(比如 "#ff0000")。
rgb_number 规定颜色值为 rgb 代码的背景颜色(比如 "rgb(255,0,0)")。


HTML tag th Reference Manual HTML <th> tag