HTML <tr> alignProperty

HTML <tr> Tag

Example

HTML table with center-aligned rows:

<table width="100%" border="1">
  <tr align="center">
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr align="center">
    <td>January</td>
    <td>$100</td>
  </tr>
</table>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the align attribute.

Note:Very few browsers can correctly handle the "char" value.


Definition and Usage

HTML5 does not support the <tr> align attribute. Please use CSS instead.

The align attribute specifies the horizontal alignment of the content in a table row.


Syntax

<tr align="left|right|center|justify|char">

Property value

Value Description
left Left-aligns content (default for <td> elements).
right Right-aligned content.
center Center-aligns content (default for <th> elements).
justify Stretches the row so that each row can have equal width (like in newspapers and magazines).
char Align content to the specified characters.


HTML <tr> Tagother extensions