<tfoot>タグは、テーブルのフッターを表す際に使用します。
table要素の子要素として配置されたtfoot要素は、 そのテーブルのフッター(列の要約)となる行ブロックを表します。
tfoot要素は、 table要素の子として、 caption要素、 colgroup要素、 thead要素、 tbody要素、 tr要素 の後に配置します。
親要素にそれ以上のコンテンツがない場合、終了タグ</tfoot>を省略できます。
以下のサンプルは、ある企業の粗利益表をマークアップしたものです。 tfoot要素は、それぞれの縦列の要約として機能しています。
<style>
#arari { border-collapse: collapse; border: solid thick; }
#arari thead, #arari tbody { border: solid medium; }
#arari tfoot { border: double medium; }
#arari th { border: solid thin; padding:4px; text-align: center; background-color:#cccc99;}
#arari td { border: solid thin; padding:4px; text-align: right; background-color:#ffffff;}
</style>
<table id="arari">
<caption>粗利益率表</caption>
<thead>
<tr><th> </th><th>2008年</th><th>2007年</th><th>2006年</th></tr>
</thead>
<tbody>
<tr><th>純売上高</th><td>$ 32,479</td><td>$ 24,006</td><td>$ 19,315</td></tr>
<tr><th>売上原価</th><td>$ 21,334</td><td>$ 15,852</td><td>$ 13,717</td></tr>
</tbody>
<tbody>
<tr><th>粗 利 益</th><td>$ 11,145</td><td>$ 8,154</td><td>$ 5,598</td></tr>
</tbody>
<tfoot>
<tr><th>粗利益率</th><td>34.3%</td><td>34.0%</td><td>29.0%</td></tr>
</tfoot>
</table>
2008年 | 2007年 | 2006年 | |
---|---|---|---|
純売上高 | $ 32,479 | $ 24,006 | $ 19,315 |
売上原価 | $ 21,334 | $ 15,852 | $ 13,717 |
粗 利 益 | $ 11,145 | $ 8,154 | $ 5,598 |
粗利益率 | 34.3% | 34.0% | 29.0% |