+ 1
I still unable to understand the use of 'colspan' in table, can anyone tell me please?
I'm confused how to use'colspan' in tables.
3 Respuestas
+ 6
<table width="200" border="3" cellspacing="3" sellpadding="8" align="center">
<tr>
<td colspan = "2" bgcolor="green">Flowers</td>
</tr>
<tr>
<td>Rose</td>
<td>Carnation</td>
</tr>
<tr>
<td>Lily</td>
<td>Chamomile</td>
</tr>
</table>
+ 10
Colspan is used to expand a column size to the specified unit. For example, if the value of colspan is 3, then the corresponding column will occupy space of 3 columns.
Example code: https://code.sololearn.com/WMCtz6gWOqBD/?ref=app
In the above example, the column under blue-green is taking space of 2 columns because its colspan is 2.
+ 4
Attribute colspan combines the specified quantity into onе.
if you write a col of 2, then one cell will be like two, and if you write a colspan of 4, then like four.