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

HTML Reference Manual

Complete List of HTML Tags

HTML td align attribute

The align attribute specifies the horizontal alignment of the content within a cell. All major browsers support the align attribute.

 HTML <td> tag

Online Example

Right-align the content in the cell:

<table style="width:100%;" border="1">
  thead>
    <tr>
      <th>Programming Language Books</th>
      <th>Price</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="right">PHP Basic Tutorial</td>
      <td>$50</td>
    </tr>
    <tr>
      <td align="left">JAVA Programming Thought</td>
      <td>$80</td>
    </tr>
  </tbody>
</table>
Test see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the align attribute.

Note:All major browsers can correctly handle the "char" value.

Definition and Usage

HTML5 The <td> align attribute is not supported. Use CSS instead.

The align attribute specifies the horizontal alignment of the content within the cell.

Syntax

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

Attribute Value

ValueDescription
leftLeft align content (the default value of <td>).
rightRight align content.
centerCenter align content.
justifyExpand the line so that each line can have equal width (for example, in newspapers and magazines).
charAlign content to a specified character.
 HTML <td> tag