colspan | Sololearn: Learn to code for FREE!

+3

colspan

what is colspan???

3/5/2017 9:45:25 AM

kishor

3 Answers

New Answer

+4

<table> <tr> <td>first row, first cell</td> <td>first row, second cell</td> </tr> <tr> <td colspan="2">second row, covers two cells</td> </tr> </table>

+4

'colspan' define the number of cells in a <table> row that are merged. 'rowspan' do same for many cells in a <table> column... Cells merged don't have to be define in <table> tree: if you 'colspan' a cell, the count of <td>s elements in the shared parent <td> must be adapted consequently... ( for a 4 columns table, if you define one <td> with colspan value 2, you will have 3 instead 4 <td> at all in the parent <tr> )