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>
試してみる »
ブラウザサポート
![]()
![]()
![]()
![]()
![]()
align 属性をサポートしているのは、Opera と Internet Explorer 8 およびそれ以前の IE バージョンのみです(IE9 はこの属性をサポートしていません)。
定義と使い方
HTML5 は <col> の align 属性をサポートしていません。
align 属性は、col 要素に関連するコンテンツの水平方向の配置を指定します。
構文
<col align="left|right|center|justify|char">
属性値
| 值 | 説明 |
|---|---|
| left | コンテンツを左揃えにします(デフォルト値)。 |
| right | コンテンツを右揃えにします。 |
| center | コンテンツを中央揃えにします(th 要素のデフォルト値)。 |
| justify | 行を引き伸ばして、各行の長さが等しくなるようにします(新聞や雑誌のように)。 |
| char | コンテンツを指定された文字に揃えます。 |
HTML <col> タグ その他の拡張