Splitting up Tables Using a Head Body and Foot
Last update on: 06-13-2008Tables can be divided into three portions: a header, a body, and a foot. The head and foot are rather similar to headers and footers in a word-processed document that remain the same for every page, while the body is the main content of the table.
The separation of the parts of the table allows for the richer formatting of tables by browsers. For example, when printing a table, browsers could print the head and foot of a table on each page if the table spreads more than one side. Aural browsers could allow users to navigate between content and headers or footers with additional information easily. Indeed, Netscape 6 was the first browser that allowed you to create a table where the header and footer remain fixed while the body scrolls if the table does not fit on the page (unfortunately IE 6 does not support these attributes yet).
The three elements for separating the head, body, and foot of a table are:- <thead> to create a separate table header
- <tbody> to indicate the main body of the table
- <tfoot> to create a separate table footer
Note that the <tfoot> element must appear before the <tbody> element in the source document.
Example:
Creating Tables's lessons:
Introducing TablesBasic Table Elements And Attributes
Splitting Up Tables Using A Head Body And Foot
Spanning Columns Using The Colspan Attribute
Spanning Rows Using The Rowspan Attribute

