<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
1. Introduction to Data Integrity 1. Introduction...
During this period of time, I was studying docker...
mysqldump tool backup Back up the entire database...
CSS is the realm of style, layout, and presentati...
When we are doing front-end development, we will ...
Preface When installing the executable file of a ...
1. Single column index Choosing which columns to ...
Table of contents 1. Introduction 2. Detailed exp...
The implementation principle of Vue2.0/3.0 two-wa...
The GtkTreeView component is an advanced componen...
Remark: The amount of data in this article is 1 m...
1. Manually create and add my.ini file # CLIENT S...
Solution to the problem that there is no unzip co...
Custom tags can be used freely in XML files and HT...
This article shares with you a detailed tutorial ...