小编Bil*_*man的帖子

表标题仅适用于html中的顶行吗?

我总是看到th标签只用在表的第一行.是否有一些特定原因导致它无法用于沿最左侧列创建"左"标题.这是不好的形式,还是这样.

基本上,一个表格在顶行和最左边的列上有标题,最左上方为空.

例如

<table>
    <tr>
        <th><!--empty--></th>
        <th>Top 1</th>
        <th>Top 2</th></tr>
    <tr>
        <th>LeftHeader?</th>
        <td>data1</td>    
        <td>data2</td></tr>
</table>
Run Code Online (Sandbox Code Playgroud)

html html-table

16
推荐指数
1
解决办法
2万
查看次数

标签 统计

html ×1

html-table ×1