Page 104 - Computer Class 08
P. 104
Colspan and Rowspan Attributes
A table is isolated into lines and each column is separated into cells. In a few circumstances,
we require the Table cells traverse crosswise over (or combined) more than one segment or
line. In these circumstances, we can utilize Colspan and Rowspan characterstics.
Colspan
The colspan trait characterises the quantity of sections a cell ought to traverse (or union) on a
level plane. That is, you need to consolidation at least two cells in succession into a solitary
cell.
<td colspan = 2>
The above code will combine two cells as one cell on a level plane.
Rowspan
The rowspan trait determines the quantity of lines a phone ought to traverse vertically. That
is, you need to union at least two cells in an indistinguishable segment from a solitary cell
vertically.
<td rowspan = 2>
The above code will consolidate two cells as on cell vertically.
Look at the example given below.
<html>
<head>
<title>HTML Table Colspan/Rowspan</title>
</head>
<body>
<table border=“1”>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr><td rowspan=“2”>Row 1 Cell
1</td><td>Row 1 Cell 2</td><td>Row
1 Cell 3</td></tr>
<tr><td>Row 2 Cell 2</td><td>Row 2
Cell 3</td></tr>
Computer-8 104