HTML and CSS Reference
In-Depth Information
Now that you've seen how columns can be referenced through the use of column
groups, you'll create a column group for the programming table. You'll mark the fi rst col-
umn containing the broadcast times for the different KPAF programs using a
col
element
with the class name
fi rstCol
, and mark the remaining seven columns containing the daily
program listings with a
col
element spanning seven columns and identifi ed with the
class name
dayCols
. These groupings will allow you to format the two sets of columns in
different ways later on in the next session.
To mark the column groups:
◗
1.
Return to the
schedule.htm
file in your text editor.
◗
2.
Directly below the
caption
element, insert the following
colgroup
element, as
shown in Figure 5-20:
<colgroup>
<col class=”firstCol” />
<col class=”dayCols” span=”7” />
</colgroup>
Figure 5-20
Inserting a column group
first column
i
n the group
next se
ve
n columns
groupe
d
together
colum
n
group
◗
3.
Save your changes to the file.
◗
4.
Creating row groups and column groups defines the table's structure but should
not alter its appearance. To confirm that the row and column groups have not
modified the table's appearance, refresh the
schedule.htm
file in your browser.
Verify that the table layout is the same as that shown earlier in Figure 5-18.