Latest web development tutorials

HTML attribut table bgcolor

table HTML Manuel tag de référence HTML balise <table>

Exemples

table HTML avec la couleur de fond:

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

Essayez »

support du navigateur

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Tous les principaux navigateurs prennent en charge l'attribut bgcolor.


Définition et utilisation

HTML5 ne supporte pas la balise <table> attribut bgcolor. Utilisez CSS à la place.

Dans HTML 4.01, <table> l'bgcolor attribut obsolète .

bgcolor attribut spécifie la couleur de la table de fond.


notes de compatibilité

Dans HTML 4.01, <table> l'bgcolor attribut obsolète, s'il vous plaît utiliser les CSS à la place.

CSS syntaxe: <table style = "background-color: red">

CSS Exemple: table des couleurs d'arrière - plan

Dans notre tutoriel CSS vous pouvez trouver plus d' informations sur les background-color attribut détails.


grammaire

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

Valeur de la propriété

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


table HTML Manuel tag de référence HTML balise <table>