span
HTML <col> span 属性
在这里,前两列背景颜色为红色:
<table border="1">
<colgroup>
<col span="2" style="background-color:red"/>
<col style="background-color:yellow"/>
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
定义和用法
span 属性规定 col 元素应该横跨的列数。
HTML 4.01 与 HTML5之间的差异
无。
语法
<col span="*number*">
属性值
值 | 描述 |
---|---|
number | 设置 col 元素应该横跨的列数。 |
浏览器兼容性
span |
---|