In order to clearly distinguish the table structure in the source code, the html language specifies three tags: <head>, <tbody>, and <tfoot>, respectively, corresponding to the table head, table body and table tail of the table. The <head> tag is used to define the style at the top of the table.
align represents horizontal alignment, where left is on the left, center is on the center, and right is on the right. Valign represents vertical alignment, top is top, middle is center, bottom is bottom.
Set the table style with marks.
01 <!-- -------------------------------------------------------------------------------------------------------------------------
02 <!-- File example: 10-44.htm -->
03 <!-- File description: Set the table style-->
04 <!-- -------------------------------------------------------------------------------------------------------------------------
05 <html>
06 <head>
07 <title>Set the table style</title>
08 </head>
09 <body>
10 <table border=3 width=400 height=100 bordercolor=#336699 align=center>
11 <thead align=center bgcolor=#00ccff>
12 <tr>
13 <td colspan=2>Web page production software</td>
14 </tr>
15 </head>
16 <tr>
17 <td>Web Image Software</td><td>fireworks</td>
18 </tr>
19 <tr>
20 <td>Web page production software</td><td>dreamweaver</td>
21 </tr>
22 <tr>
23 <td>Web animation software</td><td>flash</td>
24 </tr>
25 </table>
26 </body>
27 </html>
Line 11 defines the style of the table header, and line 15 sets the end of the table header.