Table Col Span

I want a table where one of my row will have only 2 columns while others have 5 columns?
How to span the columns in html tables?


Col Span

While using table, it will be need of time that some of our rows should have lesser columns then others. It can be easily achieved by using colspan.
For example I have a table with two rows and three colums. Now I want the first row to be of one column and the second to be of three columns.


First Row . .
second Row 2 2
First Row
second Row 2 2
Table Spanned Table

Here we have spanned one of the column to three columns. That is instead of adding three columns we will add only one column and span it using the attribute colspan="x". In this case as the column should be spanned to three we will be adding an attribute "colspan=3".
<td colspan=3>
First Row</td>
Second Row
<td >.</td>

Ask Questions

Ask Question