<TABLE> テーブル(表)を作成する
<TABLE>はテーブル(表)を作成するタグです。テーブル(表)の基本的な構造は、<TABLE>〜<TABLE>内に<TR>〜</TR>で表の横一行を定義して、さらにその中に<TH>〜</TH>や<TD>〜</TD>でセルを定義します。
テーブル(表)の各セルには見出しを定義するヘッダセル(<TH>〜</TH>)と、データを定義するデータセル(<TD>〜<TD>)があります。ヘッダセル内のテキストは、一般的なブラウザでは太字でセンタリングされて表示されます。
使用例
HTMLの記述方法
<table border="0" cellspacing="1" cellpadding="3" width="95%">
<tr>
<td width="171" align="center" bgcolor="#FFFFFF">戸建てのお客様</td>
<td width="378" align="center" bgcolor="#C4F1B1"><strong>フレッツ・光プレミアムファミリータイプ</strong></td>
</tr>
<tr>
<th width="171" align="center" bgcolor="#BBDDFF">月額利用料</th>
<td width="378" align="center" bgcolor="#E7FADE">3,870円(税込4,063円)</td>
</tr>
<tr>
<th width="171" align="center" bgcolor="#BBDDFF">屋内配線利用料</th>
<td width="378" align="center" bgcolor="#E7FADE">200円(税込210円)</td>
</tr>
<tr>
<th width="171" align="center" bgcolor="#BBDDFF">回線終端装置利用料</th>
<td width="378" align="center" bgcolor="#E7FADE">900円(税込945円)</td>
</tr>
<tr>
<td width="171" align="right" bgcolor="#FFFFFF"><strong>合計金額</strong></td>
<td width="378" align="center" bgcolor="#00CC66" class="size14-line"><strong>4,970円(税込5,218円)</strong></td>
</tr>
</table>
ブラウザではこう見えます
| |
フレッツ・光プレミアムファミリータイプ |
| 月額利用料 |
3,870円(税込4,063円) |
| 屋内配線利用料 |
200円(税込210円) |
| 回線終端装置利用料 |
900円(税込945円) |
| 合計金額 |
4,970円(税込5,218円) |