In complex table structures, some cells span multiple cells in the vertical direction, which requires the use of the cross-column property COLSPAN.
Basic syntax<TD COLSPAN=VALUE>
Syntax explanationVALUE represents the number of columns that the cell spans.
File example: 10-33.htmImplement cells across columns through the COLSPAN attribute.
01 <!-- ------------------------------ -->
02 <!-- File example: 10-33.htm -->
03 <!-- File description: Set a table across columns-->
04 <!-- ------------------------------ -->
05 <HTML>
06 <HEAD>
07 <TITLE>Set the table across columns</TITLE>
08 </HEAD>
09 <BODY>
10 <TABLE BORDER=3 WIDTH=400 HEIGHT=100 Bordercolor=#336699 ALIGN=CENTER>
11 <TR>
12 <TD ColSpan=2 Align=Center>Web page production software</TD>>
13 </TR>
14 <TR>
15 <TD>Web Image Software</TD><TD>Fireworks</TD>
16 </TR>
17 <TR>
18 <TD>Web page production software</TD><TD>Dreamweaver</TD>
19 </TR>
20 <TR>
21 <TD>Web animation software</TD><TD>Flash</TD>
22 </TR>
23 </TABLE>
24 </BODY>
25 </HTML>
Document descriptionThe first cell in row 12 spans two columns.