Choosing Which Borders to Display
When you use the border attribute (see page 230), a border appears between each cell and also around the table itself. (X)HTML lets you choose which external sides of the table should have a border as well as which internal borders should be displayed.

To choose which external sides should have a border:
In the table tag, type frame="location", where location is one of the values listed below:
void, for no external borders (default) above, for a single border on top below, for a single border on bottom hsides, for a border on both the top and bottom sides vsides, for a border on both the right and left sides rhs, for a single border on the right side lhs, for a single border on the left side box or border, for a border on all sides


To choose which internal borders should be displayed:
In the table tag, type rules="area", where area is one of the following values:
none, for no internal rules (default) rows, for horizontal rules between each row in the table cols, for vertical rules between each column in the table (Figures 16.61 and 16.62)


groups, for rules between column groups (created with the colgroup element described on pages 246247) and horizontal sections as defined by the tags described on pages 246248 (Figures 16.63 and )


all, for rules between each row and column in the table
Tips
It is the groups value for rules that illustrates the difference between colgroup and col. The colgroup element defines what is considered a column group and therefore where lines are drawn with the groups value. The col element does not. It is also the groups value which makes this whole technique worthwhile (Figure 16.64). Otherwise, you can use the CSS border property to get much more control over borders (see page 230).
 |