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.