Latest web development tutorials

HTML tbody align property

HTML tbody tag Reference Manual HTML <tbody> tag

Examples

Right Align <tbody> element content:

<table border="1" width="100%">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody align="right">
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support align attribute.

Note: IE can not correctly handle the "justify" value, IE will be centered manner.

Note: Almost no browser can handle "char" value correctly.


Definition and Usage

HTML5 does not support the <tbody> align attribute. Use CSS instead.

align attribute specifies the <tbody> element contents of the horizontal alignment.


grammar

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

Property Value

描述
left 左对齐内容(表格数据的默认值)。
right 右对齐内容。
center 居中对齐内容(th 元素的默认值)。
justify 对行进行伸展,这样每行都可以有相等的宽度(就像在报纸和杂志中)。
char 将内容对准指定字符。


HTML tbody tag Reference Manual HTML <tbody> tag