如何以HTML显示表格主体
在HTML中使用<tbody>标记显示表格主体。HTML<tbody>标记用于将主体添加到表中。tbody标签与thead标签和tfoot标签一起用于确定表格的每个部分(页眉,页脚,正文)。
示例
您可以尝试运行以下代码以HTML形式显示表主体-
<!DOCTYPE html>
<html>
<head>
<title>HTML tbody Tag</title>
</head>
<body>
<table style = "width:100%" border = "1">
<thead>
<tr>
<td colspan = "4">This is the head of the table</td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan = "4">This is the foot of the table</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
<tr>
...more rows here containing four cells...
</tr>
</tbody>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
<tr>
...more rows here containing four cells...
</tr>
</tbody>
</table>
</body>
</html>热门推荐
10 生日寿宴祝福语简短精辟
11 礼盒宝宝生日祝福语简短
12 新年简短的英文祝福语
13 好友上岸成功祝福语简短
14 周二祝福语大全简短
15 文案写信祝福语大全简短
16 诗意新婚祝福语高级简短
17 给老板祝福语简短精辟
18 牛年佛家祝福语大全简短