OCTOBER CLASS X HTML -II: IMAGES, LINKS AND TABLES
For practical guideline visit:- HTML 2022
PRACTICE HTML CODE CLICK LINK BELOW HTML II
WEEK 12/10/2026 to 17/10/2026
CLASS X HTML -II: IMAGES, LINKS AND TABLES
HTML CODE 01
Cellpadding: This property specifies the space between the border of a table cell and its contents (i.e) it defines the whitespace between the cell edge and the content of the cell.
Cellspacing: This property specifies the space between cells, that is, it defines the whitespace between the edges of the adjacent cells.
Using Rowspan
The rowspan attribute allows one cell to extend across two or more rows.
For example:
<table border="1">
<tr>
<th>Name</th>
<th>Activity</th>
</tr>
<tr>
<td rowspan="2">Aman</td>
<td>Running</td>
</tr>
<tr>
<td>Swimming</td>
</tr>
</table>Here, the Aman cell occupies two rows.
┌──────────┬────────────┐
│ Name │ Activity │
├──────────┼────────────┤
│ │ Running │
│ Aman ├────────────┤
│ │ Swimming │
└──────────┴────────────┘
Using Colspan
The colspan attribute allows one cell to extend across two or more columns.
For example:
<table border="1">
<tr>
<th>Name</th>
<th>Marks</th>
<th>Grade</th>
</tr>
<tr>
<td>Riya</td>
<td colspan="2">Excellent</td>
</tr>
</table>
The Excellent cell occupies two columns.
┌──────────┬──────────┬──────────┐
│ Name │ Marks │ Grade │
├──────────┼─────────────────────┤
│ Riya │ Excellent │
└──────────┴─────────────────────┘
Comments
Post a Comment