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

Perform data statistics on different values ​​of the same field in SQL

Application scenario: It is necessary to count th...

Docker+gitlab+jenkins builds automated deployment from scratch

Table of contents Preface: 1. Install Docker 2. I...

A brief discussion on the optimization of MySQL paging for billions of data

Table of contents background analyze Data simulat...

MySQL database introduction: detailed explanation of database backup operation

Table of contents 1. Single database backup 2. Co...

Difference between querySelector and getElementById methods in JS

Table of contents 1. Overview 1.1 Usage of queryS...

Vue3+TypeScript encapsulates axios and implements request calls

No way, no way, it turns out that there are peopl...

jQuery plugin to implement accordion secondary menu

This article uses a jQuery plug-in to create an a...

Implementation of mysql backup strategy (full backup + incremental backup)

Table of contents Design scenario Technical Point...

Detailed steps for installing ros2 in docker

Table of contents Main topic 1. Install Docker on...

Native js to achieve simple carousel effect

This article shares the specific code of js to ac...

A brief analysis of the responsiveness principle and differences of Vue2.0/3.0

Preface Since vue3.0 was officially launched, man...

The difference between mysql outer join and inner join query

The syntax for an outer join is as follows: SELEC...

Detailed explanation of reduce fold unfold usage in JS

Table of contents fold (reduce) Using for...of Us...

W3C Tutorial (11): W3C DOM Activities

The Document Object Model (DOM) is a platform, a ...