HTML thead tag definition and usage detailed introduction

HTML thead tag definition and usage detailed introduction

Copy code
The code is as follows:

<thead> <!– Treat the first two lines as the header area–>
<tr>
<td rowspan=”2″></td>
<td rowspan=”2″></td>
<td rowspan=”2″></td>
<td colspan=”3″></td>
<td scope=”col” colspan=”2″ rowspan=”2″></td>
</tr>
</thead>

I would like to ask why the comment in this code <thead> <!– Treat the first two lines as the header area–> says that the first two lines are treated as the header area. Does it mean that the thead element itself defaults to two lines? Or is there some other reason?
Also, does scope="col" mean locking the scope to the column? What's the point of doing this?
This should be combined with rowspan="2", thead simply represents the table header.

HTML <thead> tag <br />Definition and usage:
The <thead> tag defines the table header. This tag is used to group the header content of an HTML table.
The thead element should be used in conjunction with the tbody and tfoot elements.
The tbody element is used to group the body content in an HTML table, while the tfoot element is used to group the caption (footer) content in an HTML table.
Note: If you use thead, tfoot, and tbody elements, you must use all of them. They appear in this order: thead, tfoot, tbody, so that the browser can render the footer before receiving all the data. You must use these tags inside a table element.
Tip: By default these elements do not affect the layout of the table. However, you can use CSS to make these elements change the appearance of the table.
Detailed description:
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 enables browsers to support scrolling of the table body independently of the table header and footer. When long forms are printed, the table header and footer may be printed on each page that contains the table data.
Example: HTML table with thead, tbody, and tfoot elements:

Copy code
The code is as follows:

<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>

<<:  Detailed explanation of GaussDB for MySQL performance optimization

>>:  CSS pixels and solutions to different mobile screen adaptation issues

Recommend

Summary of tips for making web pages

Preface This article mainly summarizes some of th...

JavaScript single thread and asynchronous details

Table of contents 1. Task Queue 2. To explain som...

Native js custom right-click menu

This article example shares the specific code of ...

Detailed process of implementing the 2048 mini game in WeChat applet

Rendering Example Code Today we are going to use ...

How to configure SSL for koa2 service

I. Introduction 1: SSL Certificate My domain name...

Secondary encapsulation of element el-table table (with table height adaptation)

Preface During my internship at the company, I us...

What to do if you forget the initial password of MySQL on MAC

The solution to forgetting the initial password o...

How to view and modify the time zone in MySQL

Today I found that a program inserted an incorrec...

Practical example of nested routes in vue.js Router

Table of contents Preface Setting up with Vue CLI...

Mysql case analysis of transaction isolation level

Table of contents 1. Theory SERIALIZABLE REPEATAB...

A brief analysis of the best way to deal with forgotten MySQL 8 passwords

Preface Readers who are familiar with MySQL may f...

Example of how to implement value transfer between WeChat mini program pages

Passing values ​​between mini program pages Good ...

Meta tags in simple terms

The META tag, commonly referred to as the tag, is...

Tutorial on customizing rpm packages and building yum repositories for Centos

1 Keep the rpm package downloaded when yum instal...