Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^320) Chapter 8 Tables


Phone
E-mail


Jack
5/13
857-555-5555
[email protected]


Sparky
11/28
303-555-5555
[email protected]


Figure 8.14
Table with a row that
spans two columns
FAQ
What if I want a more interesting table?
You can alter the gridlike look of a table by applying the colspanand rowspanattributes to
elements. As you get into more complex table configurations like these, be sure to
sketch the table on paper before you start typing the XHTML code.
The colspanAttribute. This attribute specifies the number of columns that a cell
will occupy. Figure 8.14 shows a row that spans two columns.
The XHTML code for the table follows:








This spans two columns
Column 1 Column 2

The rowspanAttribute. This attribute specifies the number of rows that a cell will
occupy. An example of a column that spans two rows is shown in Figure 8.15.
Figure 8.15
Table with a column
that spans two rows
Free download pdf