English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <tr> align attribute

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 <tr> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the align attribute.

Note:Almost no browsers can correctly handle the "char" value.

Definition and Usage

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.

Syntax

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

Attribute value

ValueDescription
leftLefts the content (the default value for <td> elements).
rightRights the content.
centerCenters the content (the default value for <th> elements).
justifyStretches the line so that each line can have equal width (as in newspapers and magazines).
charAligns content to a specified character.
 HTML <tr> tag