![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIiZpdmLwV3LcNXZnFWbp9CXt92YuI2bv5Wdy5yd3d3Lc9CX6MHc0RHaiojIsJye.gif)
HTML <tbody> 标簽
向右對齊 <tbody> 元素中的内容:
<table border="1"
width="100%">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody align="right">
<td>January</td>
<td>$100</td>
<td>February</td>
<td>$80</td>
</tbody>
</table>
所有主流浏覽器都支援 align 屬性。
<b>注意:</b>IE 無法正确地處理 "justify" 值,IE 會以居中的方式進行處理。
<b>注意:</b>幾乎沒有浏覽器能夠正确地處理 "char" 值。
HTML5 不支援 <tbody> align 屬性。請使用 CSS 代替。
align 屬性規定 <tbody> 元素中的内容的水準對齊方式。
<tbody align="left|right|center|justify|char">
值
描述
left
左對齊内容(表格資料的預設值)。
right
右對齊内容。
center
居中對齊内容(th 元素的預設值)。
justify
對行進行伸展,這樣每行都可以有相等的寬度(就像在報紙和雜志中)。
char
将内容對準指定字元。
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIiZpdmLwV3LcNXZnFWbp9CXt92YuI2bv5Wdy5yd3d3Lc9CX6MHc0RHaiojIsJye.gif)