<td>标签scope属性设置某个表格单元格是否是列、行、列组或行组的表头。scope属性在浏览器没有效果,但是在屏幕阅读器可呈现。
把两个表格单元格规定为行的表头
<table border="1" > <tr> <th >教程课程</th> <th >学习天数</th> </tr> <tr> <td scope="row">php</td> <td >7天</td> </tr> <tr> <td scope="row">HTML</td> <td>6天</td> </tr> </table>
<td scope="值"></td>
值 | 描述 |
---|---|
col | 规定单元格是列的表头。 |
row | 规定单元格是行的表头。 |
colgroup | 规定单元格是列组的表头。 |
rowgroup | 规定单元格是行组的表头。 |