English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
A propriedade align da tabela HTML define o alinhamento da tabela em relação ao texto ao redor; geralmente, a tabela HTML tem uma quebra antes e depois. A propriedade align permite que outros elementos HTML envolvam a tabela.
Uma tabela HTML alinhada à direita:
!DOCTYPE html <html> <head> <meta charset="utf-8"> <title>Uso da propriedade align no HTML table-Manual básico(oldtoolbag.com)</title> <style>table, th, td { border: 1px sólido preto;}</style> </head> <body> <table align="right"> <tr> <th>Nome</th> <th>Créditos</th> </tr> <tr> <td>张三</td> <td>90</td> </tr> <tr> <td>李四</td> <td>87</td> </tr> </table> <p>A propriedade align permite que o texto envolva a tabela.</p> </body> </html>Teste e veja ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the align attribute.
HTML5 The align attribute of <table> is deprecated. Please use CSS instead.
In HTML 4.01 In
The table align attribute specifies the alignment of the table based on the surrounding text.
Generally, HTML tables have a break before and after them. The align attribute allows other HTML elements to wrap around the table.
In HTML 4.01 In
CSS Syntax: <table style="float:right">
In our CSS tutorial, you can find more aboutfloat attribute details.
<table align="left|right|center">
Value | Description |
---|---|
left | Left align table. |
right | Right align table. |
center | Center align table. |