HTML table markup tutorial (14): table header

HTML table markup tutorial (14): table header
<br />In HTML language, you can automatically add a title to the table through tags. In addition, the first row of the table is called the header, which can also be achieved through HTML tags.
Basic syntax
<TABLE> ....
<TR>
<TH>Title 1</TH><TH>Title 2</TH><TH>Title 3</TH><TH>Title 4</TH><TH>Title 5</TH>
</TR>
........
</TABLE>
Syntax Explanation: The BORDER attribute is used to define the width of the border line in pixels.
<html>
<head>
<title>Comprehensive example of table markup</title>
</head>
<body>
<table border="1" width="80%" bgcolor="#e8e8e8" cellpadding="2" bordercolor="#0000ff" bordercolorlight="7d7dff" bordercolordark="#0000a0">
<tr>
Atlantic Division
<th width="30%" colspan="2" valign="bottom">Central Division</th>
<th width="30%" colspan="2" valign="bottom">Southeast Division</th>
</tr>
<tr>
<td width="16%" align="center">Celtics</td>
<td width="16%" align="center">76ers</td>
<td width="17%" align="center">Piston</td>
<td width="17%" align="center">Bull</td>
<td width="17%" align="center">Heat</td>
<td width="17%" align="center">Wizards</td>
</tr>
<tr>
<td width="16%" align="center">Network</td>
<td width="16%" align="center">Knicks</td>
<td width="17%" align="center">Walker</td>
<td width="17%" align="center">Knight</td>
<td width="17%" align="center">Magic</td>
<td width="17%" align="center">Bobcat</td>
</tr>
<tr>
<td width="16%" align="center">Raptors</td>
<td width="16%" align="center">Crossing the River</td>
<td width="17%" align="center">Bucks</td>
<td width="17%" align="center">Chicago</td>
<td width="17%" align="center">Eagle</td>
<td width="17%" align="center">Yao Ming</td>
</tr>
</table>
</body>
</html>
Among them, <TH></TH> refers to the table header and title.

<<:  What are the differences between var let const in JavaScript

>>:  Detailed explanation of replication configuration example between mysql containers

Recommend

Docker deploys nginx and mounts folders and file operations

During this period of time, I was studying docker...

Several ways to backup MySql database

mysqldump tool backup Back up the entire database...

Several techniques for playing sounds with CSS

CSS is the realm of style, layout, and presentati...

How to implement responsive layout in vue-cli

When we are doing front-end development, we will ...

How to completely delete the MySQL service (clean the registry)

Preface When installing the executable file of a ...

MySQL index usage instructions (single-column index and multi-column index)

1. Single column index Choosing which columns to ...

A simple and in-depth study of async and await in JavaScript

Table of contents 1. Introduction 2. Detailed exp...

Analysis of GTK treeview principle and usage

The GtkTreeView component is an advanced componen...

How to quickly create tens of millions of test data in MySQL

Remark: The amount of data in this article is 1 m...

How to decompress multiple files using the unzip command in Linux

Solution to the problem that there is no unzip co...

How to use custom tags in html

Custom tags can be used freely in XML files and HT...

Detailed tutorial for installing mysql 8.0.12 under Windows

This article shares with you a detailed tutorial ...