<TD> テーブル(表)のデータセルを作成する
テーブル(表)の基本的な構造は、<TABLE>〜<TABLE>内に<TR>〜</TR>で表の横一行を定義して、さらにその中に<TH>〜</TH>や<TD>〜</TD>でセルを定義します。
<TD>はTable Dataの略で、セルの内容が「データ」となるデータセルを作成します。セルの内容が「見出し」の場合には、<TH>〜</TH>を使用します。
使用例
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円) |