編集:選択した回答には、ネストされたテーブルを使用せずに作成できた作業フィドルへのリンクが含まれています。
次の図のようなレイアウトでHTMLのテーブルをセマンティックにコーディングしたいと思います。残念ながら、私はここのネットワーク上でそれのようなものを見つけることができませんでした。
セルの幅を手動で設定することで外観を強制することができましたが、作成しているコードが意味をなすようにしたいのですが、幅を手動で設定しないと、標準のレンダリングの外観がより良くなるため、そうではないと思います。次の写真のように。
これまでのところ、私が思いついた問題のあるコードは次のようになっています。
<table>
<thead>
<tr>
<th scope="col">Type of Loss Dollar</th>
<th scope="col">Reserve Amount</th>
<th scope="col">Paid Amount</th>
<th scope="col">Total This Loss</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">
<table>
<tbody>
<tr>
<th scope="row">Medical</th>
<td><input type="text" /></td>
<td><input type="text" /></td>
</tr><tr>
<th scope="row">Indemnity</th>
<td><input type="text" /></td>
<td><input type="text" /></td>
</tr><tr>
<th scope="row">Expense</th>
<td><input type="text" /></td>
<td><input type="text" /></td>
</tr>
</tbody>
</table>
</td><td>
TOTAL
</td>
</tr>
</tbody>
</table>