The header refers to the first row of the table, where the text can be centered and bolded, which is achieved by the <TH> tag.
Basic syntax01 <TABLE>
02 <TR>
03 <TH>…</TH>
04 …
05 </TR>
06 <TR>
07 <TD>…</TD>
08 …
09 </TR>
10…
11 </TABLE>
Syntax explanationUse the <TH> tag instead of the TD> tag, the only difference is that the content in the tag is centered and bolded.
File example: 10-17.htmImplement the table header with the <TH> tag.
01 <!-- ------------------------------ -->
02 <!-- File example: 10-17.htm -->
03 <!-- File description: Set the table header-->
04 <!-- ------------------------------ -->
05 <HTML>
06 <HEAD>
07 <TITLE>Set the 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 production 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 descriptionLines 12 and 13 define the table header.