tfoot element contains a block of rows (
tr) representing a footer section of a
table. This element can be useful to insert cells providing, among others, summaries or average values for the data in each column.
tfoot element can only be present once in the
table and must take place at its end, right after all of its bodies.
In previous versions of the standard, the
tfoot element had several presentational attributes that have been removed in the HTML5 specification. Authors should drop their use in favor of style sheets.
Previously, HTML5 allowed
tfoot to precede the body in the code, letting browsers fix its position to the bottom of the table when rendering. This behavior is no longer valid, and
tfoot should alway be after any body of the
<table class="egt"> <thead> <tr> <th>Contributor</th> <th>Amount</th> </tr> </thead> <tbody> <tr> <td>Jhon Doe</td> <td>$1,500.00</td> </tr> <tr> <td>William Park</td> <td>$750.00</td> </tr> <tr> <td>Sean Carpenter</td> <td>$500.00</td> </tr> <tr> <td>Steven Seagull</td> <td>$3,000.00</td> </tr> <tr> <td>Frank Furt</td> <td>$2,000.00</td> </tr> </tbody> <tfoot> <tr> <th>Total</th> <th>$7,750.00</th> </tr> </tfoot> </table>
The horizontal alignment of text in all affected cells. There are five possible values (case-insensitive):
- left: text is aligned to the left margin. This is the default value for data cells (
- center: text is centered. This is the default value for header cells (
- right: text is aligned to the right margin.
- justify: text is justified or aligned to both margins.
- char: text is aligned to a specific character. It's used together with the
This attribute has become obsolete in HTML5 and, therefore, its use is no longer valid. Authors should replace it with style sheet declarations.
A caracter that will act as axis for text alignment. It's meant to work together with the
align attribute when it has the "char" value. In other situations it will be completely ignored.
This attribute has become obsolete in HTML5 and its use is consequently invalid. Authors are adviced to replace it with style sheet declarations.
<tfoot align="char" char="c">
An offset, from the first occurrence of the alignment caracter (specified in the
char attribute) and in the direction of the text. The resulting character of this calculation will be the axis for text alignment.
For this attribute to be considered, the
align attribute's value must be "char" and the
char attribute must be present.
This attribute is considered obsolete by HTML5 and its use is no longer recommended. Authors should drop its use in favor of style sheets.
<tfoot align="char" char="t" charoff="7">
The vertical alignment of text in all affected cells. There are four possible values (case-insensitive):
- top: text is aligned to the top margin.
- middle: text is vertically centered.
- bottom: text is aligned to the bottom margin.
- baseline: all the cells in a row with this alignment should have their first text line on a common baseline.
This attribute is obsolete according to the HTML5 standard and, therefore, invalid. Authors are adviced to avoid its use and replace it with style sheet declarations.
For information about global attributes refer to this list of global attributes in HTML5.
For information about global events refer to this list of global events in HTML5.