Use thead, tfoot, and tbody to create a table

Use thead, tfoot, and tbody to create a table
Some people use these three tags in a perverted way to make the title follow the table, or make the tbody have a fixed height and automatically have a scroll bar appear when it walks out.


Copy code
The code is as follows:

<title>thead, tfoot and tbody tags</title>
<table border="1">
<thead>
<tr>
<th>Subject</th>
<th>score</th>
</tr>
</thead>
<tbody>
<tr>
<td>Language</td>
<td>99</td>
</tr>
<tr>
<td>Mathematics</td>
<td>60</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total score</td>
<td>159</td>
</tr>
</tfoot>
</table>

<<:  Example code for evenly distributing elements using css3 flex layout

>>:  Introduction to new ECMAscript object features

Recommend

How to write memory-efficient applications with Node.js

Table of contents Preface Problem: Large file cop...

Detailed tutorial on installing mysql under Linux

1. Shut down the mysql service # service mysqld s...

Docker dynamically exposes ports to containers

View the IP address of the Container docker inspe...

How to limit the number of records in a table in MySQL

Table of contents 1. Trigger Solution 2. Partitio...

Solution to BT Baota Panel php7.3 and php7.4 not supporting ZipArchive

The solution to the problem that the PHP7.3 versi...

Vue implements custom "modal pop-up window" component example code

Table of contents Preface Rendering Example Code ...

Cause Analysis and Solution of I/O Error When Deleting MySQL Table

Problem phenomenon I recently used sysbench to te...

In-depth understanding of HTML form input monitoring

Today I saw a blog post about input events, and o...

Detailed explanation of HTML style tags and related CSS references

HTML style tag style tag - Use this tag when decl...

Tips for using top command in Linux

First, let me introduce the meaning of some field...

Html long text automatically cuts off when it exceeds the tag width

When we display long text, we often need to interc...

Detailed explanation of how to create an updateable view in MySQL

This article uses an example to describe how to c...

HTML table tag tutorial (35): cross-column attribute COLSPAN

In a complex table structure, some cells span mul...

Pure CSS to change the color of the picture

The css technique for changing the color of an im...