HTML and CSS Reference
In-Depth Information
the needed extra but contentless cells to a single row. (Give them a
single <br> tag as their contents if you want an embossed border around
them.)
10.2.4.5. The rowspan attribute
Just as the colspan attribute layers a table cell across several columns,
the rowspan attribute stretches a cell down two or more rows in the table.
Include the rowspan attribute in the <th> or <td> tag of the uppermost
row of the table where you want the cell to begin and set its value equal
to the number of rows you want it to span. The cell then occupies the
same space as the current row and an appropriate number of cells be-
low that row. The browser flows the contents of the cell to occupy the
entire extended space. For example:
<td rowspan="3">
creates a cell that occupies the current row plus the two rows below it.
Like the colspan attribute, the browser ignores overextended rowspan at-
tributes and extends the current cell only down rows you've explicitly
defined by other <tr> tags following the current row. The browsers do
not add empty rows to a table to fill a rowspan below the last defined row
in a table.
10.2.4.6. Combining the colspan and rowspan attributes
You may extend a single cell both across several columns and down sev-
eral rows by including both the colspan and rowspan attributes in its table
header or data tag. For example:
<th colspan="3" rowspan="4">
 
Search WWH ::




Custom Search