Nested Tables

Computer Education, Training & Tutorial Resources - ComputerEducationWorld.com
Home » Free Computer Training and Courses » HTML for Beginners »

Yes we can nest tables in each other. If you are going to design complicated web pages you will always do this. For example you need a table with border size of 3 in a specific part of a web page. To fix position of that table in your desired place you will need a table with border size of 0. In this case first table can be seen as its border size is 2 but second one will not be seen as you used it just for positioning of first table. Anyway, writing a nested table code is easy.

Example:
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<TABLE border=”0″ width=”750″>
<TR>
<TD width=”25%”>&nbsp;</TD>
<TD width=”25%”>&nbsp;</TD>
<TD width=”25%”>
<TABLE border=”2″ width=”100%”>
<TR>
<TD width=”50%”>1-</TD>
<TD width=”50%”>HTML</TD>
</TR>
<TR>
<TD width=”50%”>2-</TD>
<TD width=”50%”>C Prog.</TD>
</TR>
<TR>
<TD width=”50%”>3-</TD>
<TD width=”50%”>JScript</TD>
</TR>
</TABLE>
</TD>
<TD width=”25%”>&nbsp;</TD>
</TR>
</TABLE>
</BODY>
</HTML>

In this example we have a 1*4 table. We want to hold our main table inside this table in its third column so that our main table will be shown in right side of the center of the screen. Main table has a border size of 1 while first table is hidden.

Now you have learned table basics. You see what you learned about tables was not too
complicated however writing a complicated tables is not very easy. You must work for a little to be able to use them effectively. Tables are one of the most powerful features of html design so you must be able to use their power correctly.

Good Luck


• • •
 



captcha PHP Script Free PHP captcha script free php
Website Design by WebWalas.com