This element is part of the Complex Table
Model which allows a finer level of control than the
Simple Table Model while maintaining
backward compatibility with the simpler model. The TFOOT element is part of
a trio of table grouping elements that organize a series of Table Rows
[TR] into Header [THEAD],
Body [TBODY] and Footer [TFOOT] sections.
The THEAD and TFOOT section markers are optional, but one or more TBODY
sections are always required. If present, each THEAD, TBODY and TFOOT
element must contain one or more TR tag grouping. To allow for backward
compatibility with the older Simple Table Model, if no TBODY structures
exist in a table, the entire set of row groupings [TR] are assumed to be
a single TBODY.
The TFOOT section is used to duplicate footer information when a table must
be broken across boundaries (such as printed pages, etc.) or for use as a
static footer when TBODY elements are rendered in a scrolling panel. The
TFOOT section (along with the THEAD section) is placed before any TBODY
sections in the HTML markup to allow browsers to render the header and
footer before receiving all of the Table Body [TBODY] data (in case a
table must be broken up.) [NOTE: The suggestion about repeated table
headers/footers with printed material is a statement originally from
the HTML 4 spec - as of the time of writing, only Mozilla 1.0/Netscape 7.0
does this - maybe this feature will gain wider acceptance in the future.]
This attribute specifies a character in the cell content to be used to align the
data in the current cell. The default value for this attribute is the decimal
point character for the current specified language. No handling instructions
are given for scenarios with multiple occurrences of the same alignment
character on a single line.
This attribute specifies the spacing offset to the first occurrence of the alignment
character (specified by the CHAR attribute) on each line of the cells within the
current cell grouping. The direction of the offset is determined by the current
text direction (set with the DIR attribute or the BDO element.) In left-to-right
scenarios (default), offset is from the left margin. In right-to-left scenarios,
offset is from the right margin.
The Table model (even the Simple Table Model) is easily the most
complex markup structure in HTML. If you have other general questions
about this structure see the Table Overview.
Internet Explorer is the only major browser to support this element yet, but
this element has been integrated in to HTML 4.0 and increasing acceptance
in other browsers in the future is very likely.
Because the Complex Table model is backward compatible with the
simple model, it is quite safe to use this. Be sure to preview the
result in a browser that only supports the simple model to make sure
it conveys information in the way you intend.
The HTML specification says that end tags for THEAD, TBODY and
TFOOT elements are not necessary. You SHOULD always use them
anyway in order to give your markup better readability and to reduce
confusion in case you need to edit your HTML pages by hand.
Make sure that your THEAD element grouping comes before the TBODY
in order for it to be downloaded before any of the table TBODY content.
The specification also says that TFOOT should occur before
any TBODY groupings. The point has been raised that this organization
scheme is not very backward compatible. See more notes in the Browser
Peculiarity section below on this issue.
Currently, when using only the simple table model the only way to
create complex borders for tables is to use nested tables.
Internet Explorer requires the THEAD, TBODY and TFOOT sections to
exist in order to use the RULES and FRAME attributes of the TABLE element.
This is counter to the statement in the specifications for tables that
the omission of THEAD, TBODY and TFOOT elements IMPLIES that
the table content is all one TBODY section.
Internet Explorer 3.0 requires the TFOOT to follow after the
TBODY. Placing it before the TBODY like the specification says in IE 3.0
will not have the desired effect. In such cases the TFOOT will be rendered
before the TBODY. Internet Explorer 4.0 allows the TFOOT to exist either
before OR after TBODY sections.
Opera 4.0 does not allow CSS to be specified for TFOOT elements. They
can be applied to TR and TD/TH elements though.
Opera 4.0: The ALIGN attribute for this element only has an effect if
the cells are TD. ALIGN is not applied to TH cells in the TFOOT.
Opera 6.0: Although support is marked for %Core% attributes (CSS), very
few of the CSS properties can be applied.