HTML table markup tutorial (18): table headers

Time:2022-6-15

The header refers to the first row of the table, in which the text can be centered and bold, which is achieved through the <th> tag.
Basic grammar

01 <TABLE>

02 <TR>

03 <TH>…</TH>

04…

05 </TR>

06 <TR>

07 <TD>…</TD>

08 …

09 </TR>

10…

11 </TABLE>

Grammatical interpretation

Use the <th> tag instead of the td> tag. The only difference is that the content in the tag is bold and centered.
Document example: 10-17 htm

The header of the table is realized through the <th> tag.
01 <!– —————————— –>
02 <!– Document example: 10-17 htm –>
03 <!– File Description: set table header –>
04 <!– —————————— –>
05 <HTML>
06 <HEAD>
07 <title> set table header </title>
08 </HEAD>
09 <BODY>
10 <TABLE BORDER=3 WIDTH=400 HEIGHT=100 Bordercolor=#336699 ALIGN=”CENTER”>
11 <TR>
12 <th> software classification </th>
13<th> software name </th>
14 </TR>
15 <TR>
16 <td> web image software </td><td>fireworks</td>
17 </TR>
18 <TR>
19 <td> web page making software </td><td>dreamweaver</td>
20 </TR>
21 <TR>
22 <td> web animation software </td><td>flash</td>
23 </TR>
24 </TABLE>
25 </BODY>
26 </HTML>

Document description

Rows 12 and 13 define the table header.