如何在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>热门推荐
3 祝福语简短的微信
10 幼儿祝福语大全简短贺卡
11 感谢教官文案祝福语简短
12 鼠年同事祝福语简短创意
13 元旦祝福语 简短独特群发
14 妈咪跟我生日祝福语简短
15 给儿子新婚祝福语简短
16 伴娘祝福语长文案简短
17 恭喜高考完祝福语简短
18 生日祝福语送老公简短