Home  >  Article  >  Web Front-end  >  In-depth understanding of table tag_Experience exchange

In-depth understanding of table tag_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:04:252137browse

Not long ago, I was looking for the main tags contained in the table. Of course, I found it and shared it with everyone.

Table tags mainly include tags table, caption, th, tr, td, thead, tfoot, tbody, col, colgroup. The introduction of each is as follows:

table tag can define a table. Inside the
tag, you can place table titles, table rows, table columns, table cells, and other tables.


Define a row in the table.


Define the header of the table.
Thethead, tfoot, and tbody elements give you the ability to group rows in a table. When you create a table, you probably want to have a header row, some rows with data, and a total row at the bottom. This division gives the browser the ability to support table body scrolling independently of table headers and footers. When long tables are printed, the table header and footer can be printed on each page that contains the table data.


Define a table body (text).
Using the tag, the table can be divided into a separate section. The tag groups one or several rows in a table.
Although you may want to include one, or even two or more tags in the table, we recommend that there be no tags in the table.
In the tag, only the tag can define table rows. And once defined, a tag is an independent part of the table. For example, you cannot span from one to another .
Thethead, tfoot, and tbody elements give you the ability to group rows in a table. When you create a table, you probably want to have a header row, some rows with data, and a total row at the bottom. This division gives the browser the ability to support table body scrolling independently of table headers and footers. When long tables are printed, the table header and footer can be printed on each page that contains the table data.


Define the footer (footnote) of the table.

The thead, tfoot, and tbody elements give you the ability to group rows in a table. When you create a table, you probably want to have a header row, some rows with data, and a total row at the bottom. This division gives the browser the ability to support table body scrolling independently of table headers and footers. When long tables are printed, the table header and footer can be printed on each page that contains the table data.


Define attribute values ​​for one or more columns in a table. You can only use this attribute in a table or colgroup.


Define the grouping of table columns. This element allows you to group columns for formatting purposes. This element is only legal inside a

The caption element defines a table title. The caption tag must immediately follow the table tag. You can define only one title per table. Usually the title will be centered above the table.


Define the header cell in the table. Text inside this th element will usually be rendered bold.


Define a cell in the table.

tag.
There are two ways to use the tag: one is to simply define several identical columns, and the other is to combine several different columns.

PS: The above content is all from w3school, because w3school has marked the copyright in the copyright information and reserves all rights. Then I won’t transfer or edit it. I’ll just take a section of it, and then you can click to view the detailed introduction of a certain tag directly. You can also view the introduction to tables.
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