Data can also span multiple rows using the
rowspan attribute is used for data that spans multiple rows (perhaps an event goes on for multiple hours on a certain day). It accepts an integer (greater than or equal to 1) to denote the number of rows it spans across.
In the example above, there are four rows:
- The first row contains an empty cell and the two column headings.
- The second row contains the
Morning row heading, along with
Work, which spans two rows under the
Saturday column. The "Relax" entry spans three rows under the
- The third row only contains the
Afternoon row heading.
- The fourth row only contains the
Dinner entry, since "Relax" spans into the cell next to it.
If you'd like to see how the browser interprets the code above, feel free to copy and paste it into the code editor to understand it a little better.