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

HTML Referenzhandbuch

HTML-Tag大全

HTML tbody align Eigenschaft

Die align-Attribut von <tbody> bestimmt die horizontale Ausrichtung des Inhalts innerhalb des <tbody>-Elements.

 HTML <tbody> Tag

Online-Beispiel

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

Browser Compatibility

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.

Definition and Usage

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.

Syntax

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

Attribute Value

ValueDescription
leftAligns the content to the left (the default value for table data).
rightAligns the content to the right.
centerCenters the content (the default value for the th element).
justifyExtends the line so that each line can have equal width (as in newspapers and magazines).
charAligns the content to the specified character.
 HTML <tbody> Tag