Sometimes you may need the
entries in a table to stretch
across more than one column.
attribute can be
used on a
and indicates how many columns
that cell should run across.
In the example on the right
you can see a timetable with
ﬁve columns; the ﬁrst column
contains the heading for that
row (the day), the remaining four
represent one hour time slots.
If you look at the table cell that
contains the words 'Geography'
you will see that the value of the
indicates that the cell should run
across two columns. In the third
row, 'Gym' runs across three
You can see that the second
and third rows have fewer
elements than there are
columns. This is because, when
a cell extends across more than
one column, the
cells that would have been in the
place of the wider cells are not
included in the code.
I added some CSS styles to this
example so that you can see how
the cells span more than one
column. You will learn how to do
this on pages 250, 337-340.