English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die align-Attribut von <tbody> bestimmt die horizontale Ausrichtung des Inhalts innerhalb des <tbody>-Elements.
In <tbody>-Elementen den Inhalt rechtsbündig ausrichten:
<table style="width:100%;" border="1"> <thead> <tr> <th>程序语言书籍</th> <th>价格</th> </tr> </thead> tbody align="right"> <tr> <td>PHP基础教程</td> <td>$50</td> </tr> <tr> <td>JAVA编程思想</td> <td>$80</td> </tr> </tbody> </table>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the align attribute.
Note:IE cannot handle the "justify" value correctly; IE will process it as centered.
Note:Almost no browsers can handle the "char" value correctly.
HTML5 The <tbody> align attribute is not supported. Use CSS instead.
The align attribute specifies the horizontal alignment of the content within the <tbody> element.
<tbody align="left|right|center|justify|char">
Value | Description |
---|---|
left | Aligns the content to the left (the default value for table data). |
right | Aligns the content to the right. |
center | Centers the content (the default value for the th element). |
justify | Extends the line so that each line can have equal width (as in newspapers and magazines). |
char | Aligns the content to the specified character. |