English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Usage of the <tr> align attribute, which specifies the horizontal alignment of content within a table row. Online examples demonstrate how to use the <tr> align attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
HTML table with all rows aligned to the left:
<table style="width:100%" border="1"> <tr align="left"> <td>2018</td> <td>$15320.00</td> </tr> <tr align="left"> <td>2019</td> <td>$18320.00</td> </tr> </table>Test see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the align attribute.
Note:Almost no browsers can correctly handle the "char" value.
HTML5 The <tr> align attribute is not supported. Please use CSS instead.
The align attribute specifies the horizontal alignment of the content within a table row.
<tr align="left|right|center|justify|char">
Value | Description |
---|---|
left | Lefts the content (the default value for <td> elements). |
right | Rights the content. |
center | Centers the content (the default value for <th> elements). |
justify | Stretches the line so that each line can have equal width (as in newspapers and magazines). |
char | Aligns content to a specified character. |