colgroup标签是什么意思?html colgroup标签怎么用
作用:对表格中的列进行组合,以便对其进行格式化。
说明:
如需对全部列应用样式,879b49175114808d868f5fe5e24c4e0b 标签很有用,这样就不需要对各个单元和各行重复应用样式了。879b49175114808d868f5fe5e24c4e0b 标签只能在 table 元素中使用。
注释:
所有主流浏览器都支持 879b49175114808d868f5fe5e24c4e0b 标签。firefox、chrome 以及 safari 仅支持 colgroup 元素的 span 和 width 属性。
html colgroup标签使用示例
<!doctype html><html><head> <meta charset="utf-8"> <title>title</title></head><body><table width="100%" border="1"> <colgroup span="2"></colgroup> <colgroup style="color:#0000ff;"></colgroup> <tr> <th>商品种类</th> <th>名称</th> <th>价格</th> </tr> <tr> <td>衣服</td> <td>衬衣</td> <td>53元</td> </tr> <tr> <td>鞋子</td> <td>板鞋</td> <td>199元</td> </tr></table></body></html>
效果:
以上就是html colgroup标签怎么用的详细内容。