In the last lecture we explored how to create a basic table. Now we'll see how the table width behaves when one table is nested into another table cell. If a table is placed within another table, it is referred to as a nested table. The table containing the nested table, is referred to as the parent table.
Let's start by creating another table in our document, that has one row and one column. For now set the
width to 100% and
bordercolor to red, so we can distinguish between the two tables.
<table width="100%" border="1" bordercolor="red" cellspacing="2" cellpadding="2">
With the table created, nest the original table, inside this new parent table.
Save your file, and preview it in your web browser.
You should see your original table with the blue border nested within the parent table with the red border.
Let's try a couple of scenarios, to see how a nested table behaves inside a parent, relevant to table width.
As illustrated in this lesson, the width settings of the nested and parent table will affect the way the table is displayed in your browser.