<table> <caption>キャプション</caption> <tr> <th>項目</th> <td>項目</td> </tr> </table> <table border="外枠の太さ" width="幅" height="高さ" cellspacing="枠の太さ" cellpadding="項目内容と罫線との幅" bgcolor="背景色"> <caption valign="上下の位置"> ... "top", "bottom" <tr align="左右の位置" ... "left", "center", "right" valign="上下の位置" ... "top", "middle", "bottom" bgcolor="背景色"> <td align="左右の位置" ... "left", "center", "right" valign="上下の位置" ... "top", "middle", "bottom" rowspan="たてに連結するフィールドの個数" colspan="よこに連結するフィールドの個数" nowrap ... 自動改行しない width="幅" height="高さ" bgcolor="背景色">
- <!-- table01.html -->
- <html>
- <head>
- <title>わたしのホーム・ページ</title>
- <meta http-equiv="Content-type" content="text/html; charset=Shift_JIS"/>
- </head>
- <body>
- <h1>わたしのホーム・ページ</h1>
- <h2>ホイップとポテトン</h2>
- <p>
- <table border="1">
- <tr>
- <th>名前</th>
- <th>性別</th>
- <th>誕生日</th>
- <th>写真</th>
- </tr>
- <tr>
- <th>ホイップ</th>
- <td>おんなのこ</td>
- <td>12月14日</td>
- <td><img src="pic_0036.jpg" alt="ホイップ"/></td>
- </tr>
- <tr>
- <th>ポテトン</th>
- <td>おとこのこ</td>
- <td>7月7日</td>
- <td><img src="pic_0364.jpg" alt="ポテトン"/></td>
- </tr>
- </table>
- </p>
- </body>
- </html>
□ 実行結果