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

Detailed summary of mysql sql statements to create tables

mysql create table sql statement Common SQL state...

MySQL transaction control flow and ACID characteristics

Table of contents 1. ACID Characteristics Transac...

Good website copywriting and good user experience

Looking at a website is actually like evaluating a...

How to deploy MySQL and Redis services using Docker

Table of contents How to deploy MySQL service usi...

Summary of 50+ Utility Functions in JavaScript

JavaScript can do a lot of great things. This art...

Detailed explanation of character sets and validation rules in MySQL

1Several common character sets In MySQL, the most...

React example of how to get the value of the input box

React multiple ways to get the value of the input...

Example code of CSS layout at both ends (using parent's negative margin)

Recently, during the development process, I encou...

Learn the basics of JavaScript DOM operations in one article

DOM Concepts DOM: document object model: The docu...

Hide div in HTML Hide table TABLE or DIV content css style

I solved a problem tonight that has been botherin...

Pure CSS to achieve click to expand and read the full text function

Note When developing an article display list inte...

Connector configuration in Tomcat

JBoss uses Tomcat as the Web container, so the co...