<分区>
<table>
<tbody>
<tr>
<th>Default</th>
<td><input type="checkbox" name="checkbox" id=""></td>
</tr>
</tbody>
</table>
此 HTML 代码片段是否有效?
标签 html
<分区>
<table>
<tbody>
<tr>
<th>Default</th>
<td><input type="checkbox" name="checkbox" id=""></td>
</tr>
</tbody>
</table>
此 HTML 代码片段是否有效?
最佳答案
同时包含表格标题和表格数据单元格的表格行没有任何无效。从语义上讲,这通常只有在标题为 scope="row"
时才有意义。
关于html - <th> 和 <td> inside <tr> 是合法的HTML代码吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19999145/