Help:Wiki University HTML-- Tables - Row Spans
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
- Nesting Lists
- Fonts - Changing
- Font Size
- Font Colors
- Font Bold-Italics
- Width and Height
- Tables - Borders
- Tables - Widths
- Tables - Captions
- Tables - Col Labels
- Tables - Cells
- Tables - Rows
- Tables - Placement
- Tables - Sorting
- Tables - Scrolling
- Tables - Col Only
- Tables - Col Spans
- Tables - Row Spans
- Infobox - Creating
- Infobox - Placing
- Infobox - If function
- Position - Relative
- Position - Absolute
SPANNING ROWS IN TABLES[edit | edit source]
- You have learned how to span columns with individual cells; you can also span rows as well.
Here is an example:
- NOTICE in the first column, the first cell of the second row was merged with the first cell of the third row.
This ability to span rows is not quite as useful as spanning columns but it does have its uses.
HOW TO SPAN ROWS[edit | edit source]
- If a cell is to span two rows, as in the above example, we use a class called "rowspan":
- This coding is inserted right after the <td> or <th> tags:
- NOTICE the "2" represents the number of rows to span.
- However to merge cells in a column, we erase the number of cells in the column to equal to the number we specified in the rowspan attribute minus one.
- So if we want to merge two cells in a column we erase only the cell immediately below it.
- If you were combining three cells, you would delete just the two immediately below, not three cells below.
Here is the coding for the first three rows of the above table:
- NOTICE again the location of the class "rowspan."
- NOTICE that the third row is missing the FIRST cell because it was merged with the cell in the row above.
RESTRICTIONS[edit | edit source]
- You cannot create sortable tables with rowspans.
TRY THESE OUT . . . . .[edit | edit source]