私は与えられたテーブルを持っているとしましょう:
+------+------+------+
| Col1 | Col2 | Col3 |
+------+------+------+------+
| Row1 | D1.1 | D1.2 | D1.3 |
+------+------+------+------+
| Row2 | D2.1 | D2.2 | D2.3 |
+------+------+------+------+
| Row3 | D3.1 | D3.2 | D3.3 |
+------+------+------+------+
そしてそれをHTML5で表現したい。難しいのは、このようなテーブルは意味的に重要でなければならないということですが、左上のセルは意味的に重要ではなく、より重要な列ヘッダーを並べるためのスペーサーです。これを行う最善の方法は何ですか?私の最初のアイデアは、次のようにすることです。
<table>
<thead>
<tr>
<th></th>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</tr>
</thead>
<tbody>
<tr>
<th>Row1</th>
<td>D1.1</td>
<td>D1.2</td>
<td>D1.3</td>
</tr>
<tr>
<th>Row2</th>
<td>D2.1</td>
<td>D2.2</td>
<td>D2.3</td>
</tr>
<tr>
<th>Row3</th>
<td>D3.1</td>
<td>D3.2</td>
<td>D3.3</td>
</tr>
</tbody>
</table>
ただし、スペースに使用するなど、そこに置く<th></th>
のは間違っているように感じます。これを行うより良い方法はありますか?<p> </p>