In the horizontal direction, you can set the alignment of the table headers, including three types: left, center, and right.
Basic syntax<TH ALIGN=LEFT>
<TH ALIGN=CENTER>
<TH ALIGN=RIGHT>
Syntax explanationLEFT is on the left, CENTER is on the center, and RIGHT is on the right.
File example: 10-40.htmSets the horizontal alignment of the header.
01 <!-- -------------------------------------------------------------------------------------------------------------------------
02 <!-- File example: 10-40.htm -->
03 <!-- File description: Set the table header center alignment->
04 <!-- -------------------------------------------------------------------------------------------------------------------------
05 <HTML>
06 <HEAD>
07 <TITLE>Set the table header center alignment</TITLE>
08 </HEAD>
09 <BODY>
10 <H1>Mainstream web design software</H1>
11 <TABLE BORDER=3 WIDTH=400 HEIGHT=100 Bordercolor=#336699 Background=10-8.jpg CellSpacing=10 CellPadding=25>
12 <TR>
13 <TH ALIGN=CENTER>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 13 defines the horizontal alignment of the table header as centered.