Latest web development tutorials

HTML propriété table align

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

Exemples

Un tableau HTML aligné à droite:

<table border="1" align="right">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>

Essayez »

support du navigateur

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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


Définition et utilisation

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

Dans HTML 4.01, <table> L'attribut align est obsolète .

attribut align spécifie la table par rapport à l'alignement du texte environnant.

En général, une table de HTML apparaîtra avant et après l'enveloppement. En utilisant l'attribut align peut obtenir l'effet d'autres éléments HTML autour de la table.


notes de compatibilité

Dans HTML 4.01, <table> L'attribut align est obsolète, utilisez CSS à la place.

CSS syntaxe: <table style = "float: right">

CSS Exemple: l' alignement de la table

Dans notre tutoriel CSS vous pouvez trouver plus d' informations sur la propriété float détail.


grammaire

<table align="left|right|center">

Valeur de la propriété

描述
left 左对齐表格。
right 右对齐表格。
center 居中对齐表格。


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