By default, the title of the table is centered horizontally, and we can set the horizontal alignment of the title text through the ALIGN attribute.
Basic syntax<Caption ALIGN=LEFT>…</Caption>
<Caption ALIGN=CENTER>…</Caption>
<Caption ALIGN=RIGHT>…</Caption>
Syntax explanationLEFT is on the left, CENTER is on the center, and RIGHT is on the right.
File example: 10-15.htmSet the horizontal alignment of the table title through the ALIGN attribute marked with the <CAPTION>.
01 <!-- ------------------------------ -->
02 <!-- File example: 10-15.htm -->
03 <!--File description: Set the horizontal alignment of the table title-->
04 <!-- ------------------------------ -->
05 <HTML>
06 <HEAD>
07 <TITLE>Set the horizontal alignment of the table title</TITLE>
08 </HEAD>
09 <BODY>
10 <TABLE BORDER=3 WIDTH=400 HEIGHT=100 Bordercolor=#336699 ALIGN=CENTER>
11 <CAPTION ALIGN=RIGHT>Mainstream web design software</CAPTION>
12 <TR>
13 <TD>Web Image Software</TD><TD>Fireworks</TD>
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 right alignment of the table title text.