HTML <table> align attribute
HTML <table> tag
Example
A right-aligned HTML table:
<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> |
Try it yourself!
|
Definition and Usage
The align attribute specifies the alignment of a table according to
surrounding text.
Normally, an HTML table will have a break before and after it. The align
attribute allows other HTML elements to wrap around the table.
Browser Support

The align attribute is deprecated, but still supported in all major browsers.
Compatibility Notes
The align attribute of the table element was deprecated in HTML 4.01,
and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <table style="float:right">
CSS
Example: table alignment
In our CSS tutorial you can find more details about the
float property.
Syntax
Attribute Values
Value |
Description |
left |
Left-aligns the table |
right |
Right-aligns the table |
center |
Center-aligns the table |
HTML <table> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|