Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

More Advanced Table Enhancements 279

10






Output ▼


Grouping and Aligning Rows


Now that you know how to group and format columns, let’s turn to the rows. You can
group the rows of a table into three sections: table heading, table footer, and table body.
You can modify CSS properties to emphasize the table heading and table footer and give
the body of the table a different appearance.


The table header, footer, and body sections are defined by the , , and


elements, respectively. Each of these elements must contain the same number of
columns.

The ... element defines the heading of the table, which should contain
information about the columns in the body of the table. Typically, this is the same type of
information that you’ve been placing within header cells so far in the lesson.


The head of the table appears right after the

element or after ele-
ments, as the following example shows, and must include at least one row group defined
by the element. I’m including style attributes in the row grouping tags to illustrate
how they are used. The table is formatted as follows:


FIGURE 10.28
The class schedule
with formatted col-
umn groups.