[Back] The Information Commons
.................... Introduction to HTML

4.10.5 TABLES can contain TABLES

Each table cell can in turn contain its own table. This allows for more precise structuring of table layout, and of table borders. The following example shows how this can work.


<TABLE  WIDTH=80%>
  <TR> <TD COLSPAN=3 ALIGN="center"><H2>This is an Overall Title</h2></TD> </TR>
  <TR>
     <TD ALIGN="center" VALIGN="center">
         <TABLE BORDER=4 CELLSPACING=8> 
            <TR> <TD COLSPAN=2 ALIGN="center">Subheading One </TD> </TR> 
            <TR> <TD>Item 1                </TD> <TD> Item 2 </TD> </TR>
          </TABLE> 
     </TD>
     <TD WIDTH=20%>   </TD>
     <TD ALIGN="center" VALIGN="center">
         <TABLE BORDER=4 CELLSPACING=8>
            <TR> <TD COLSPAN=2 ALIGN="center">Subheading Two </TD> </TR>
            <TR> <TD>Item 3                </TD> <TD> Item 4  </TR>
       </TABLE>
     </TD>
  </TR>
</TABLE>

The above table is displayed as....

This is an Overall Title

Subheading One
Item 1 Item 2
Subheading Two
Item 3 Item 4

[Back] .................... Introduction to HTML

Page Last Updated: 4 December 1995