English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The align attribute specifies the horizontal alignment of the content within a cell. All major browsers support the align attribute.
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 ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the align attribute.
Note:All major browsers can correctly handle the "char" value.
HTML5 The <td> align attribute is not supported. Use CSS instead.
The align attribute specifies the horizontal alignment of the content within the cell.
<td align="left|right|center|justify|char">
Value | Description |
---|---|
left | Left align content (the default value of <td>). |
right | Right align content. |
center | Center align content. |
justify | Expand the line so that each line can have equal width (for example, in newspapers and magazines). |
char | Align content to a specified character. |