HTML td align Attribute
Source:
HTML <td> align Attribute
Example
Align the content of a cell to the right:
<table width="100%" border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td align="right">$100</td>
</tr>
</table>
Browser Support
The align attribute is supported in all major browsers.
Note: Very few browsers can correctly handle the "char" value.
Definition and Usage
The HTML5 specification does not support the <td> align attribute. Please use CSS instead.
The align attribute specifies the horizontal alignment of the content in a cell.
Syntax
<td align="left|right|center|justify|char">
Attribute Values
| Value | Description |
|---|---|
| left | Aligns the content to the left (default for <td>). |
| right | Aligns the content to the right. |
| center | Centers the content. |
| justify | Stretches the lines so that each line has equal width (as in newspapers and magazines). |
| char | Aligns the content to a specified character. |
YouTip