To be more correct, use the thead and tbody tags. You can have more than one tbody tag within a table. The tbody tag is a means to group rows. The tbody tag is required if 1) the table contains a thead/tfoot and/or 2) there are more than one tbody in the table. The width attribute in the table tag sets the table to cover whatever percentage of the page is specified. (80% in this example)
Class |
Building |
Day/Evening |
Class |
Building |
Day/Evening |
Accounting |
KRI |
D/E |
Management |
KRI |
E |
Finance |
MAS |
D/E |
Biology |
MAS |
D/E |
Astronomy |
ATC |
D |
Biochemistry |
MAS |
D |
This probably looks like a lot of work for little or no effect. But defining the groupings allows you to then use the frame and rules attributes of the table tag to create specific effects with the border. (Headings/footer were changed to non-centered). The following table has the frame set to hsides and the rules set as groups.
Class |
Building |
Day/Evening |
Class |
Building |
Day/Evening |
Accounting |
KRI |
D/E |
Management |
KRI |
E |
Finance |
MAS |
D/E |
Biology |
MAS |
D/E |
Astronomy |
ATC |
D |
Biochemistry |
MAS |
D |
The attribute of frame can be "above" (only top side of the border), "below" (only bottom side of the border), "hsides" (top & bottom), "lhs" (left side), "rhs" (right side), "vsides" (Left & right), "box" (all four sides), and "border" (same as box).
The attribute of rules can be "groups" (rule will appear between groups as defined by thead, tfoot and tbody; and between column groups as defined by colgroup and col), "rows" (rule only between rows), "cols" (rule only between columns), and "all" (rule between all rows and columns).