HTM54


BACK

DESCRIPTION

OUTPUT

SOURCE CODE






DESCRIPTION:

     Table cells can span across more than one column or row. The attributes COLSPAN ("how many across") and ROWSPAN ("how many down") indicate how many columns or rows a cell should take up.

            Each row or column in a table must have the same number of cells defined. Cells that span across or columns count for as many cells as the value of their ROWSPAN or COLSPAN attribute.


..Back to the top..



OUTPUT:


A Web page with variable-size table cells
This table uses equal cells
Cell 1Cell 2Cell 3Cell 4
Cell 5Cell 6Cell 7Cell 8
Cell 9Cell 10Cell 11Cell 12

This table uses cell 5 that spans two rows and three columns
Cell 1Cell 2Cell 3Cell 4
Cell 5 Cell 6Cell 7Cell 8
Cell 9Cell 10Cell 11Cell 12

This table uses cell 5 that spans two rows and three columns. The table also has a width of 200 pixels, a height of 100 pixels, and cell spacing of 8 pixels
Cell 1Cell 2Cell 3Cell 4
Cell 5 Cell 6Cell 7Cell 8
Cell 9Cell 10Cell 11Cell 12


..Back to the top..



SOURCE CODE:


<HTML>
<HEAD>
<TITLE>A Web page with variable-size table cells</TITLE></HEAD>
<BODY>
<FONT COLOR = red><CENTER>This table uses equal cells</center></FONT>
<TABLE ALIGN =center BORDER = 4>
<TR>
<TD>Cell 1</TD><TD>Cell 2</TD><TD>Cell 3</TD><TD>Cell 4</TD>
</TR>
<TR>
<TD>Cell 5</TD><TD>Cell 6</TD><TD>Cell 7</TD><TD>Cell 8</TD>
</TR>
<TR>
<TD>Cell 9</TD><TD>Cell 10</TD><TD>Cell 11</TD><TD>Cell 12</TD>
</TR>
</TABLE>
<P>
<FONT COLOR = red><<CENTER>This table uses cell 5 that spans two rows and three columns</CENTER></FONT>
<TABLE ALIGN =center BORDER = 4>
<TR>
<TD>Cell 1</TD><TD>Cell 2</TD><TD>Cell 3</TD><TD>Cell 4</TD>
</TR>
<TR>
<TD ROWSPAN = 2 COLSPAN = 3 ALIGN = center>Cell 5</TD>
<TD>Cell 6</TD><TD>Cell 7</TD><TD>Cell 8</TD>
</TR>
<TR>
<TD>Cell 9</TD><TD>Cell 10</TD><TD>Cell 11</TD><TD>Cell 12</TD>
</TR>
</TABLE>
<P>
<FONT COLOR = red><CENTER>This table uses cell 5 that spans two rows and three columns.
The table also has a width of 200 pixels, a height of 100 pixels, and cell spacing of 8 pixels</CENTER></FONT>
<TABLE ALIGN =center BORDER = 4 WIDTH = 200 HEIGHT = 100 CELLSPACING = 8>
<TR>
<TD>Cell 1</TD><TD>Cell 2</TD><TD>Cell 3</TD><TD>Cell 4</TD> </TR>
<TR>
<TD ROWSPAN = 2 COLSPAN = 3 ALIGN = center>Cell 5</TD>
<TD>Cell 6</TD><TD>Cell 7</TD><TD>Cell 8</TD> </TR>
<TR>
<TD>Cell 9</TD><TD>Cell 10</TD><TD>Cell 11</TD><TD>Cell 12</TD>
</TR>
</TABLE>
</BODY>
</HTML>


..Back to the top..