English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de tags HTML

Propriedade align da tabela HTML

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.

 HTML <table> tag

Exemplo online

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 ‹/›

Navegador compatível

IEFirefoxOperaChromeSafari

All major browsers support the align attribute.

Definition and usage

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.

Compatibility comment

In HTML 4.01 In

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

CSS Example: Table Alignment

In our CSS tutorial, you can find more aboutfloat attribute details.

Syntax

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

Attribute value

ValueDescription
leftLeft align table.
rightRight align table.
centerCenter align table.
 HTML <table> tag