HTML
Example
A right-aligned HTML table:
| Month | Savings |
|---|---|
| January | $100 |
| February | $80 |
Try it »
Browser support





All major browsers support the align attribute.
Definition and Usage
HTML5 does not support
In HTML 4.01,
The align attribute specifies the alignment of the table relative to the surrounding text.
Typically, line breaks appear before and after an HTML table. By using the align attribute, you can achieve the effect of other HTML elements surrounding the table.
Compatibility notes
In HTML 4.01,
CSS syntax:
In our CSS tutorial, you can find more details about The float attribute details.
Syntax
Attribute values
| Value | Description |
|---|---|
| left | Left-align the table. |
| right | Right-align the table. |
| center | Center-align the table. |
HTML