如何在HTML中包括表格列组?
使用<colgroup>标记包括表列组。HTML<colgroup>标记用于为表中的一组列指定属性。如果需要将不同的属性应用于colgroup中的列,则可以使用colgroup标签中的HTMLcol标签。
示例
您可以尝试运行以下代码以在HTML中实现<colgroup>标记-
<!DOCTYPE html>
<html>
<head>
<title>HTML col Tag</title>
</head>
<body>
<p>此示例显示具有三个不同宽度的列的 colgroup:</p>
<table border = "1">
<colgroup span = "4">
<col width = "40"></col>
<col width = "70"></col>
<col width = "100"></col>
<col width = "130"></col>
<col width = "160"></col>
</colgroup>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
<td>Five</td>
</tr>
</table>
</body>
</html>热门推荐
1 狗狗技能训练
5 如何训练狗狗笑
6 狗狗训练排便
9 狗狗响片训练
10 如何训练狗狗不捡食
11 狗狗尿训练
12 怎么训练狗狗找东西
13 狗狗训练站立
14 狗狗训练飞盘
15 鞍山狗狗训练
16 怎样训练泰迪狗狗谢谢
17 狗狗外出训练
18 怎么训练金毛狗狗大小便