Nested Tables: Defining a table inside another table.
<html> <head> <title> Nested table </title> </head> <body> <table border=”1″ align=”center”> <tr> <td> One </td> <td> Two </td> </tr> <tr> <td> <table border=”1″> <tr> <td> Three </td> <td> Four </td> </tr> <tr> <td> Five </td> <td> Six </td> </tr> </table> </td> <td> <table border=”1″> <tr> <td> Seven </td> <td> Eight </td> </tr> <tr> <td> Nine </td> <td> Ten </td> </tr> </table> </td> </tr> </table> </body> </html> |
Display Restaurant details with nested tables:

<html> <body> <table border=”1″ align=”center”> <caption> Restaurant Menu </caption> <tr> <th> Veg </th> <th> Non Veg </th> </tr> <tr> <td> <table border=”1″> <tr> <th> Starters </td> <th> Main Course </td> </tr> <tr> <td> Soups </td> <td> Fried Rice </td> </tr> <tr> <td> Manchurias </td> <td> Noodles </td> </tr> <tr> <td> Kebabs </td> <td> Biryani </td> </tr> </table> </td> <td> <table border=”1″> <tr> <th> Starters </td> <th> Main Course </td> </tr> <tr> <td> Soups </td> <td> Fried Rice </td> </tr> <tr> <td> Manchurias </td> <td> Noodles </td> </tr> <tr> <td> Kebabs </td> <td> Biryani </td> </tr> </table> </td> </tr> </table> </body> </html> |