What Are Nested Tables & How They Are Created?
The Internet was originally used by educators and scientists who gave little thought to how a Web page would look. When designers began using Web pages, the position of items on the page became more important. Since tables were used in html to display data, designers were able to establish a workaround to manipulate elements on a page by incorporating a table within a table, called nested tables.
-
Basic Table
-
Tables are used to display data in an organized way. In addition, tables are often used in html coding to establish grids for laying out content in Web designs.
Basic Table Code
-
Tables are created with "<Table>." The rows are created with the "<TR>." The cells within the rows are created with "<TD>." A basic table with one row and two cells would look like this:
<table>
<tr>
<td>cell 1</td><td>cell 2</td>
</tr>
</table> -
Nested Table
-
Nested tables are tables that are placed inside other tables. This is most often used for Web page layouts.
Nested Table Code
-
To create a nested table, you need to determine the row and cell of the first table in which you want to place the second table. Then, you write the code for the second table within that cell. A simple nested one-row, one-cell table within the second cell above would look like this:
<table>
<tr>
<td>cell 1</td><td>cell 2</td><table>
<tr>
<td>Nested Cell 1</td></tr>
</table></tr>
</table>
CSS
-
Although nested tables are still used occasionally to design websites, cascading style sheets have made this feature irrelevant. Cascading style sheets allow the designer to manipulate the way the web page looks with fewer coding than tables in html.
-