HTML tfoot align 屬性
實例
居中對齊<tfoot> 元素中的內容:
<table border="1"
width="100%">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tfoot align="center">
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
</table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tfoot align="center">
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
</table>
嘗試一下»
瀏覽器支持
所有主流瀏覽器都支持align 屬性。
注意: IE無法正確地處理"justify"值,IE會以居中的方式進行處理。
注意:幾乎沒有瀏覽器能夠正確地處理"char"值。
定義和用法
HTML5不支持<tfoot> align屬性。 請使用CSS代替。
align 屬性規定<tfoot> 元素中的內容的水平對齊方式。
語法
<tfoot align="left|right|center|justify|char">
屬性值
值 | 描述 |
---|---|
left | 左对齐内容(默认值)。 |
right | 右对齐内容。 |
center | 居中对齐内容。 |
justify | 对行进行伸展,这样每行都可以有相等的宽度(就像在报纸和杂志中)。 |
char | 将内容对准指定字符。 |
HTML <tfoot>標籤