Tables are tags that have been used for a long time and are still used today. However, because of the refactoring of the current website, it is recommended that you not layout tables. Many friends mistakenly think that using tables is the 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 included in the table. Of course, I found them to share them with you.
The main tags in table tags include table, caption, th, tr, td, head, tfoot, tbody, col, and colgroup . The introduction to each is as follows:
<table>
The table tag defines a table. Inside the <table> tag, you can place the table's title, table rows, table columns, table cells, and other tables.
<caption>
The caption element defines a table title. The caption tag must be immediately followed by the table tag. You can only define one title for each table. Usually this title is centered on the table.
<th>
Defines the header cell within the table. The text inside this th element will usually be rendered in bold.
<tr>
Define a row in the table.
<td>
Define a cell in the table.
<head>
Defines the table header.
Thead, tfoot, and tbody elements give you the ability to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a total row at the bottom. This division allows the browser to support table body scrolling independent of the table title and footer. When a long table is printed, the table header and footer of the table can be printed on each page containing the table data.
<tbody>
Defines the body of a table (the text).
Using the <tbody> tag, you can divide a table into a separate section. The <tbody> tag can combine one or several rows in a table into a group.
While you might want to include one, and even two or more <tbody> tags in the table, we recommend that you do not have <tbody> tags in the table.
In the <tbody> tag, only the <tr> tag can define table rows. And once defined, a <tbody> tag is an independent part of the table. For example, you cannot span from one <tbody> to another <tbody>.
Thead, tfoot, and tbody elements give you the ability to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a total row at the bottom. This division allows the browser to support table body scrolling independent of the table title and footer. When a long table is printed, the table header and footer of the table can be printed on each page containing the table data.
<tfoot>
Defines the footer of the table (footnote).
Thead, tfoot, and tbody elements give you the ability to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a total row at the bottom. This division allows the browser to support table body scrolling independent of the table title and footer. When a long table is printed, the table header and footer of the table can be printed on each page containing the table data.
<col>
Defines the attribute value for one or more columns in a table. You can only use this property in tables or colgroups.
<colgroup>
Defines the grouping of table columns. This element allows you to combine columns for formatting. This element is only legal inside the <table> tag.
There are two ways to use the <colgroup> tag: one is to simply define several identical columns, and the other is to combine several different columns.
PS: All the above contents are from w3school, because w3school marks all rights in the copyright information and reserves all rights. Then I won’t repost or edit it. Take one of the paragraphs, and then you can click to view the detailed introduction of a certain tag directly. You can also view the introduction of the table.