前端:table、thead、th、tr、td
table:表格;thead:表头;tr:⾏;td:单元格;th:⼀⾏的⾸个单元格
tbody包含⾏的内容下载完优先显⽰,不必等待表格结束.另外,还需要注意⼀个地⽅。表格⾏本来是从上向下显⽰的。但是,应⽤了thead/tbody/tfoot以后,就"从头到脚"显⽰,不管你的⾏代码顺序如何。也就是说如果thead写在了tbody的后⾯,html显⽰时,还是以先thead后tbody显⽰。
<table>
<thead>
<tr>
<th>这是在thead->tr->th⾥⾯</th>
<td>这是在thead->tr->td⾥⾯</td>
</tr>
</thead>
<tbody>
<tr>
<th>这是在thead->tr->th⾥⾯</th>
<td>这是在thead->tr->td⾥⾯</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>这是在thead->tr->th⾥⾯</th>
<td>这是在thead->tr->td⾥⾯</td>
</tr>
</tfoot>
</table>
<table>
<thead>
<tr>
<th>这是在thead->tr->th⾥⾯</th>
tabletable<td>这是在thead->tr->td⾥⾯</td>
</tr>
</thead>
<tbody>
<tr>
<th>这是在thead->tr->th⾥⾯</th>
<td>这是在thead->tr->td⾥⾯</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>这是在thead->tr->th⾥⾯</th>
<td>这是在thead->tr->td⾥⾯</td>
</tr>
</tfoot>
</table>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。