假设您有一个 HTML 表格,其中一个<th>
单元格跨越多列,例如
<table>
<tr>
<th colspan="3" scope="?">Scores</th>
<!-- ...more headings here... -->
</tr>
<tr>
<th scope="col">English</th>
<th scope="col">Maths</th>
<th scope="col">Science</th>
<!-- ...more sub-headings here... -->
</tr>
<tr>
<td>12</td>
<td>16</td>
<td>20</td>
<!-- ...more cells here... -->
</tr>
</table>
跨越标题单元格的范围属性的正确值是多少?col
似乎不正确,因为它的标题有几列,但colgroup
如果我实际上没有任何colgroup
标签,它似乎不正确。