Inner Tables

Inner Tables

How to create tables inside table columns?
How to control space between table cells?

Explanation

Table inside table

Many a times we will be using table inside tables Now we will create two row with three columns. The 2nd row, 2nd column will be split again to a table with two rows, two cols. Also we will be using the attributes cellpadding and cellspacing to handle table space.
Example :

First Row First Row First Row
Second Row

Inner Table Inner Table
Inner Table Inner Table

Second Row

Result :

First Row First Row First Row
Second Row
Inner Table Inner Table
Inner Table Inner Table
Second Row

Cellpadding and Cellspacing

The space and padding can be controlled by using the attributes cellpadding and cellspacing.

Usage:
<table border=0 bgcolor="#776655" width=80% height=150 align=center cellpadding=0 cellspacing=0>

The above table can be made more elegant by changing the colors and borders and controlling cellspacing and cellpadding.Result :

First Row First Row First Row
Second Row
1 2
3 4
Second Row

Leave a Reply

Your email address will not be published. Required fields are marked *