Table Borders: Just Rows or Just Columns
<TABLE RULES="...">
controls which internal table borders are displayed. Note that these techniques currently only MSIE supports the
RULES
attribute. To set the table so that there are only borders between rows set
RULES
to
ROWS
:
<TABLE
BORDER=1 CELLPADDING=3 CELLSPACING=1
RULES=ROWS FRAME=BOX
>
which gives us
Weekday |
Date |
Qty Shipped |
Monday |
09/11/2000 |
639 |
Tuesday |
09/12/2000 |
596 |
Wednesday |
09/13/2000 |
1135 |
Thursday |
09/14/2000 |
1002 |
Friday |
09/15/2000 |
908 |
Saturday |
09/16/2000 |
371 |
Sunday |
09/17/2000 |
272 |
Notice that inside the table there are only horizontal borders, but around the outside there are borders all the way around. To have only horizontal borders outside we'll add a FRAME
attribute:
<TABLE
BORDER=1 CELLPADDING=3 CELLSPACING=1
RULES=ROWS FRAME=HSIDES
>
which gives us
Weekday |
Date |
Qty Shipped |
Monday |
09/11/2000 |
639 |
Tuesday |
09/12/2000 |
596 |
Wednesday |
09/13/2000 |
1135 |
Thursday |
09/14/2000 |
1002 |
Friday |
09/15/2000 |
908 |
Saturday |
09/16/2000 |
371 |
Sunday |
09/17/2000 |
272 |
To set the table so that there are only borders between columns set RULES
to COLS
:
<TABLE
BORDER=1 CELLPADDING=3 CELLSPACING=1
RULES=COLS FRAME=BOX
>
which gives us
Weekday |
Date |
Qty Shipped |
Monday |
09/11/2000 |
639 |
Tuesday |
09/12/2000 |
596 |
Wednesday |
09/13/2000 |
1135 |
Thursday |
09/14/2000 |
1002 |
Friday |
09/15/2000 |
908 |
Saturday |
09/16/2000 |
371 |
Sunday |
09/17/2000 |
272 |
As before, we've set the inside borders but not the outside borders. To have only vertical borders outside as well as inside we add FRAME=VSIDES
:
<TABLE
BORDER=1 CELLPADDING=3 CELLSPACING=1
RULES=COLS FRAME=VSIDES
>
which gives us
Weekday |
Date |
Qty Shipped |
Monday |
09/11/2000 |
639 |
Tuesday |
09/12/2000 |
596 |
Wednesday |
09/13/2000 |
1135 |
Thursday |
09/14/2000 |
1002 |
Friday |
09/15/2000 |
908 |
Saturday |
09/16/2000 |
371 |
Sunday |
09/17/2000 |
272 |