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

Introduction to Javascript DOM, nodes and element acquisition

Table of contents DOM node Element node: Text nod...

Detailed tutorial on installing ElasticSearch 6.4.1 on CentOS7

1. Download the ElasticSearch 6.4.1 installation ...

Basic learning and experience sharing of MySQL transactions

A transaction is a logical group of operations. E...

js to achieve the effect of dragging the slider

This article shares the specific code of how to d...

Detailed introduction to logs in Linux system

Table of contents 1. Log related services 2. Comm...

Implementation of scheduled backup in Mysql5.7

1. Find mysqldump.exe in the MySQL installation p...

Conflict resolution when marquee and flash coexist in a page

The main symptom of the conflict is that the FLASH...

How to use filters to implement monitoring in Zabbix

Recently, when I was working on monitoring equipm...

Pure CSS to achieve three-dimensional picture placement effect example code

1. Percentage basis for element width/height/padd...

How to disable foreign key constraint checking in MySQL child tables

Prepare: Define a teacher table and a student tab...

Application nesting of HTML ul unordered tables

Application nesting of unordered lists Copy code T...

HTML form tag usage learning tutorial

Forms in HTML can be used to collect various type...

Binary Type Operations in MySQL

This article mainly introduces the binary type op...

Invalid solution when defining multiple class attributes in HTML

In the process of writing HTML, we often define mu...