By default, the width and height of the header are automatically adjusted according to the content, and we can also manually set the width and height of the header.
Basic syntax<TH WIDTH=value HEIGHT=value>
Syntax explanationDefine the width of the header through attributes, and the height of the header in pixels or percentages.
File example: 10-39.htmSets the width and height of the header.
01 <!-- ------------------------------ -->
02 <!-- File example: 10-39.htm -->
03 <!-- File description: Set the width and height of the table header -->
04 <!-- ------------------------------ -->
05 <HTML>
06 <HEAD>
07 <TITLE>Set the width and height of the table header</TITLE>
08 </HEAD>
09 <BODY>
10 <H1>Mainstream web design software</H1>
11 <TABLE BORDER=1 WIDTH=400 HEIGHT=100>
12 <TR>
13 <TH WIDTH=300 height=50>Web page image software</TH><TH>Fireworks</TH>
14 </TR>
15 <TR>
16 <TD>Web page production software</TD><TD>Dreamweaver</TD>
17 </TR>
18 <TR>
19 <TD>Web animation software</TD><TD>Flash</TD>
20 </TR>
21 </TABLE>
22 </BODY>
23 </HTML>
Document descriptionLine 11 defines the table width to be 400 pixels and the height to be 100 pixels. Line 13 defines the width of the table header to be 300 pixels and the height of 50 pixels.