- 1
what is the purpose of colspan in this code
<td colspan="2"><br /></td>
4 Answers
+ 5
colspan="n" means the column for which you have given this makes the size of the column to increase its size by n times the normal one.
+ 3
I never used that so yes i agree as that shifts those extras to right side
thks for correcting me!
+ 2
Abhay when we use colspan (same logic for rowspan) we must avoid the <td>s spanned:
<table border="2px" height="300px" width="300px">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
+ 1
in your case it takes the space of next column
for example :
in below code it takes the space of next two columns and shifts them to right side,run this code and change the colspan so you can understand better
<table border="2px" height="300px" width="300px">
<tr>
<td colspan="3"></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>