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

HTML Reference Manual

HTML Tag Reference

HTML tbody align Attribute

The tbody align attribute specifies the horizontal alignment of the content within the <tbody> element.

 HTML <tbody> tag

Online Example

Align content to the right within the <tbody> element:

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

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the align attribute.

Note:IE cannot correctly handle the "justify" value; IE will process it as centered.

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

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 content to the left (the default value for table data).
rightAligns content to the right.
centerCenters the content (the default value for the th element).
justifyStretches the line so that each line can have equal width (as in newspapers and magazines).
charAligns content to the specified character.
 HTML <tbody> tag