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

A brief summary of vue keep-alive

1. Function Mainly used to preserve component sta...

Solve the problem that await does not work in forEach

1. Introduction A few days ago, I encountered a p...

React and Redux array processing explanation

This article will introduce some commonly used ar...

Detailed explanation of XML syntax

1. Documentation Rules 1. Case sensitive. 2. The a...

Detailed explanation of how to use WeChat mini program map

This article example shares the specific implemen...

Docker cleanup environment operation

Start cleaning carefully! List unused volumes doc...

Share a Markdown editor based on Ace

I think editors are divided into two categories, ...

Sharing the structure and expression principles of simple web page layout

Introduction to structure and performance HTML st...

How to connect JDBC to MySQL 5.7

1. First prepare the MySQL and Eclipse environmen...

How to Clear Disk Space on CentOS 6 or CentOS 7

Following are the quick commands to clear disk sp...

How to upload and download files between Linux server and Windows system

Background: Linux server file upload and download...

Solution to the problem of not finding Tomcat configuration in Intelli Idea

I joined a new company these two days. The compan...

A brief analysis of adding listener events when value changes in html input

The effect to be achieved In many cases, we will ...

MySQL and MySQL Workbench Installation Tutorial under Ubuntu

Ubuntu install jdk: [link] Install Eclipse on Ubu...