In-depth understanding of table tags (table) in html
PHPz
Release: 2017-04-02 10:01:45
Original
1751 people have browsed it
Table(table) is a tag that has been used by everyone for a long time. It is still used until now. However, due to the current website reconstruction, it is recommended that you do not use tables for layout. Many friends mistakenly think that using tables is non-standard. In fact, this is not the case. Tables are an important element. Not long ago, in order to find the main
# table (table) is a tag that has been used by everyone for a long time, and it is still used until now, but because In the current website reconstruction, it is recommended that you do not use tables for layout. Many friends mistakenly think that using tables is so-called non-standard. In fact, it is not the case. Tables are an important element. Not long ago, I was looking for the main tags contained in the table. Of course, I found it and shared it with everyone. The table tags mainly include table, caption, th, tr, td, thead, tfoot, tbody, col, colgroup. The introduction of each is as follows:
table tag can Define the table. Inside the
tag, you can place table titles, table rows, table columns, table cells, and other tables.
The caption element can define 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 row in the table.
Define a cell 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 independent 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). Use the tag to divide the table into a separate section. The tag groups one or more 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 cross from one into 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 independent 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. 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 independent 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 attribute value 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
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.
The above is the detailed content of In-depth understanding of table tags (table) in html. For more information, please follow other related articles on the PHP Chinese 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