HTML <col> align 屬性
實例
<table width="100%" border="1">
<col align="left">
<col align="left">
<col align="right">
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
<col align="left">
<col align="left">
<col align="right">
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
流覽器支持
只有 Opera 和 Internet Explorer 8 以及更早的IE版本支持 align屬性(IE9不支持該屬性)。
定義和用法
HTML5 不支持 <col> align 屬性。
align 屬性規定與 col 元素相關的內容的水準對齊方式。
語法
<col align="left|right|center|justify|char">
屬性值
值 | 描述 |
---|---|
left | 左對齊內容(默認值)。 |
right | 右對齊內容。 |
center | 居中對齊內容(th 元素的默認值)。 |
justify | 對行進行伸展,這樣每行都可以有相等的長度(就像在報紙和雜誌中)。 |
char | 將內容對準指定字元。 |
