Table Tricks
By Jennifer Kyrnin
Tables are a great way to layout your Web pages, and HTML 4.0 offers a few more
attributes and tags to this versatile and flexible tool. Some of these attributes
work differently in Netscape than in Internet Explorer, so always be sure to view
the page in both browsers.
Attribute
cols
an attribute of the table
tag
If you have a large table to display on the screen, you can help speed up
the download time by telling the browser how many columns are in the table.
Note: this can make tables look strange, as the browsers are not always consistent
in how they use this attribute.
Tags
<caption> .. </caption>
Use the caption tag to place explanatory text about a table near the table.
Note: Netscape and Internet Explorer position the caption in different places, so
be sure to view your pages with both browsers
<thead> .. </thead>
This tag defines the enclosed rows as the header rows of the table. If the table
is broken across several physical pages (such as when printing), the header rows
will be repeated. Internet Explorer only
<tfoot> .. </tfoot>
This tag defines the enclosed rows as the footer rows of the table. If the table
is broken across several physical pages (such as when printing), the footer rows
will be repeated. Internet Explorer only
<tbody> .. </tbody>
This tag divides your table into discrete sections. Each section is delimited with
a rule line. Internet Explorer only
<colgroup> .. </colgroup>
This tag is used to group together columns in a table. It allows you to treat the
columns in your table similarly to the rows, including rule lines to differentiate
the columns. It goes at the beginning of the table, before the content.
Internet Explorer only
<col> .. </col>
This tag is used to define the appearance of the columns within a colgroup. Internet Explorer only
I hope this came in useful!
Ask in the forum
if you have any suggestions or comments.