what is the use of spanning cells in table. (HTML)
Answers
Answered by
2
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr>
<td colspan="2">Sum: $180</td>
</tr>
</table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr>
<td colspan="2">Sum: $180</td>
</tr>
</table>
Ajaykushwaha643525:
what is the use of tjese
Answered by
6
Span simply means space
In HTML, for the purpose of designing a table, we use 'Colspan' and 'Rowspan'
Colspan: Colspan value defines the no. of columns occupied by that particular cell.
Eg:
<TH Colspan="6"> means the cell span over 6 columns.
Rowspan: It specifies the no. of rows to be spanned by a cell.
Default value:1
Eg: <TD Rowspan="6"> makes the cell span over 6 rows.
Hope this will help you ☺️
In HTML, for the purpose of designing a table, we use 'Colspan' and 'Rowspan'
Colspan: Colspan value defines the no. of columns occupied by that particular cell.
Eg:
<TH Colspan="6"> means the cell span over 6 columns.
Rowspan: It specifies the no. of rows to be spanned by a cell.
Default value:1
Eg: <TD Rowspan="6"> makes the cell span over 6 rows.
Hope this will help you ☺️
Similar questions