Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Tables > <TABLE ...> > RULES

RULES = GROUPS

RULES=GROUPS allows you to put borders between groups of table cells. there are two ways cells can be grouped: by row and by column. Let's go over each of them. note that currently Netscape does not recognize RULES.

Grouping By Row

To group by row use the <THEAD ...>, <TBODY ...>, <TFOOT ...> tags. <THEAD ...> indicates the header rows of the table, <TBODY ...> indicates the main body of the table, and <TFOOT ...> indicates the bottom rows. So, for example, this code creates a table with three groups. Borders appear just between groups:

<TABLE BORDER=2 RULES=GROUPS>

<THEAD>
<TR> <TH>Name</TH> <TH>Food</TH> <TH>Price</TH> </TR>
</THEAD>
<TBODY>
<TR> <TD>Starflower</TD> <TD>stir fied tofu</TD> <TD>5.95</TD> </TR>
<TR> <TD>Miko</TD> <TD>vegetable rice soup</TD> <TD>4.95</TD> </TR>
<TR> <TD>Andy</TD> <TD>hummus</TD> <TD>3.95</TD> </TR>
<TR> <TD>Ping</TD> <TD>french toast</TD> <TD>5.95</TD> </TR>
</TBODY>
<TFOOT>
<TR> <TH COLSPAN=2>Total</TH> 
<TD>20.80</TD> </TR>
</TFOOT>

</TABLE>

which gives us this table

NameFoodPrice
Starflowerstir fied tofu5.95
Mikovegetable rice soup4.95
Andyhummus 3.95
Ping french toast5.95
Total 20.80

Grouping By Column

To group by column use the <COLGROUP ...> tag and its SPAN attribute. <COLGROUP ...> takes a little getting used to because it doesn't actually go around any table cells. It goes at the top of the table code where it sets rules about the table columns including which are grouped together.

<COLGROUP SPAN="..."> to indicates how many columns are in each group. If you leave SPAN out then it is assumed the group has just one column. So, for example, the following code says that the first column is in a group by itself and the three after that are together in a group. notice that <COLGROUP ...> requires an end tag. Borders will go only between the groups:

<TABLE BORDER=1 CELLPADDING=4 RULES=GROUPS FRAME=BOX>

<COLGROUP></COLGROUP>
<COLGROUP SPAN=3></COLGROUP>

which gives us this table:

WeekdayDateManagerQty
Monday09/11Kelsey639
Tuesday09/12Lindsey596
Wednesday09/13Randy1135
Thursday09/14Susan1002
Friday09/15Randy908
Saturday09/16Lindsey371
Sunday09/17Susan272

<TABLE BORDERCOLOR="..."> >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com