The use and definition of html tag

黄舟
Release: 2017-06-20 16:21:38
Original
3414 people have browsed it

html5中标签作用是格式化表格中的列,这里详细介绍下标签用法、标签属性以及标签应用实例。

html中标签作用:格式化表格中的列

标签用法:

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

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

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

标签应用实例:

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

<table width="100%" border="1">
  <colgroup span="2" align="left"></colgroup>
  <colgroup align="right" style="color:#0000FF;"></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>
Copy after login

标签有哪些属性?

哪些浏览器支持标签?

所有主流浏览器都支持标签。Firefox、Chrome以及Safari仅支持colgroup元素的span和width属性。

标签定义及使用说明

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

通过使用 标签,可以向整个列应用样式,而不需要重复为每个单元格或每一行设置样式。

注释:只能在

元素之内,在任何一个 、、、 元素之前使用 标签。

提示:如果想对

中的某列定义不同的属性,请在 标签内使用 标签。

The above is the detailed content of The use and definition of html

tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
tag in html Next article:Add ellipses after text overflows and is hidden
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!
元素之后,在任何一个