What is the use of colspan and rowspan in HTML?
colspan merges a cell with the cells next to it (across columns), and rowspan merges it with the cells below (down rows).
<table>
<tr>
<th colspan="2">Report</th>
</tr>
<tr>
<td rowspan="2">Marks</td>
<td>Maths: 90</td>
</tr>
<tr>
<td>Science: 85</td>
</tr>
</table>
Remember to remove the extra cells that are covered by the merged cell. See Rowspan and Colspan.
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |