• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Creating Tables > Grouping Table Columns with colgroup

Grouping Table Columns with colgroup

Another means of grouping columns is to the colgroup element, which performs essentially the same task as col. Example 4-15 takes the basic three-column, three-row table used in Example 4-14 and applies different features to two of those columns.

Example 4-15. Using the col element to apply attributes to a number of columns

<table width="90%" border="1" cellspacing="5" cellpadding="5" summary="This table 
explores column grouping">
<caption>Column Grouping</caption>
<colgroup align="right" valign="bottom" />
					<colgroup align="right" valign="bottom" />
<tr>
<th>Table Head</th>
<th>Table Head</th>
<th>Table Head</th>
</tr>

<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>

<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</table>

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint