サイト内検索
...HTML・XHTMLタグ...
table
colgroup要素とcaption要素・行のグループと一緒に指定
caption要素・thead要素・tfoot要素・tbody要素を指定
- caption要素を同時に指定する場合は、caption要素の後に指定します。
- 「行のグループ化(thead要素・tfoot要素・tbody要素)」を同時に指定する場合は、
- 前に指定します。
サンプル
《caption要素・thead要素・tfoot要素・tbody要素と一緒に指定》
[bodyの中]
<table border="1" width="300" cellpadding="5" ><caption>[タイトル]</caption>
<colgroup span="1" bgcolor="#ccffff"></colgroup>
<colgroup span="2" bgcolor="#ccff99" align="right"></colgroup>
<colgroup bgcolor="#9999dd"></colgroup>
<thead bgcolor="#ffff8e">
<tr>
<th colspan="4">thead</th>
<tr>
</thead>
<tfoot bgcolor="#ffcc00">
<tr>
<td colspan="4" bgcolor="#ffcccc" align="right">tfoot</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>No1</td><td>No2</td><td>No3</td><td>No4</td>
</tr>
<tr>
<td>No5</td><td>No6</td><td>No7</td><td>No8</td>
</tr>
</tbody>
</table>
[ブラウザ上]
thead | |||
---|---|---|---|
tfoot | |||
No1 | No2 | No3 | No4 |
No5 | No6 | No7 | No8 |