Home  >  Article  >  Web Front-end  >  HTML tag

HTML tag

(*-*)浩
(*-*)浩Original
2019-09-29 15:46:471809browse

HTML 879b49175114808d868f5fe5e24c4e0b 标签

HTML <colgroup> tag

所有主流浏览器都支持 879b49175114808d868f5fe5e24c4e0b 标签。 (推荐学习:HTML入门教程)

Firefox、Chrome 以及 Safari 仅支持 colgroup 元素的 span 和 width 属性。

定义和用法

879b49175114808d868f5fe5e24c4e0b 标签用于对表格中的列进行组合,以便对其进行格式化。

如需对全部列应用样式,879b49175114808d868f5fe5e24c4e0b 标签很有用,这样就不需要对各个单元和各行重复应用样式了。

879b49175114808d868f5fe5e24c4e0b 标签只能在 table 元素中使用。

提示

提示:请为 879b49175114808d868f5fe5e24c4e0b 标签添加 class 属性。这样就可以使用 CSS 来负责对齐方式、宽度和颜色等等。

注:col 元素是仅包含属性的空元素。如需创建列,您就必须在 tr 元素内部规定 td 元素。

实例

两个 colgroup 元素为表格中的三列规定了不同的对齐方式和样式(注意第一个 colgroup 元素横跨两列):




ISBN Title Price
3476896 My first HTML $53
2489604 My first CSS $47

The above is the detailed content of HTML tag. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:HTML tagNext article:HTML tag

Related articles

See more