Nested Table
A nested table is a table inside another table. This is useful for creating complex layouts like invoices, reports, or dashboards.
<table border="1" cellpadding="5" cellspacing="0">
<tr>
<th>Main Table - Column 1</th>
<th>Main Table - Column 2</th>
</tr>
<tr>
<td>Row 1, Cell 1</td>
<td>
<table border="1" cellpadding="5" cellspacing="0">
<tr>
<th>Nested Table - Col 1</th>
<th>Nested Table - Col 2</th>
</tr>
<tr>
<td>Nested Row 1</td>
<td>Nested Row 1</td>
</tr>
<tr>
<td>Nested Row 2</td>
<td>Nested Row 2</td>
</tr>
</table>
</td>
</tr>
</table>
Qus. 1 : Is it possible to insert a table within another table?
- Yes, but there must be exactly 2 rows and 2 columns in first table.
- Yes, table can be inserted into cell of another table.
- Yes, but there must be no border in other table.
- No, it’s not possible.
Programs
html program to display a table with 5 rows and 4 columns. Provide appropriate heading to the form
HTML Page to display the following table
HTML Code design Time Table using rowspan and colspan
HTML Code design complex Time Table using rowspan and colspan
HTML Code to Design Basic Table
html code to design the complex table with rowspan and colspan
html table for Indian Tourist Spots