In-depth understanding of table tags_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:46:07
Original
1703 people have browsed it

Table is a tag that has been used by everyone for a long time. It is still used today. 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 the so-called non-standard. In fact, it is not the case. The table is an important element.
Not long ago, I was looking for the main tags included in the table. When I found it, of course I wanted to share it with you.
The main tags included in the table tag are 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. The

Define a row in the table.

Define the header 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 a table body (text).
Using the tag, a table can be divided into a separate section. The tag groups one or several rows in a table.
While you may want to include one, or even two or more tags in your table, we recommend having no tags in your table.
Among the tags, 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 to another .
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 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

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.
source:php.cn
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!