html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <tfoot> tag

Definition

The <tfoot> tag is used to define group footer information within a table and must be enclosed within the <table></table> element. The <tfoot></tfoot> element should only appear once within a table and follow the <thead></thead> element and precede the <tbody></tbody> element.

Example


<table>
  <thead>
    <tr>
      <th>Fruit</th>
      <th>Colour</th>
    </tr>
  </thead>
  <tfoot>
    <tr>
      <td>Salad</td>
      <td>Rainbow</td>
    </tr>
  </tfoot>
  <tbody>
    <tr>
      <td>Banana</td>
      <td>Yellow</td>
    </tr>
    <tr>
      <td>Pea</td>
      <td>Green</td>
    </tr>
  </tbody>
</table>

Required Attributes

NONE

Optional Attributes

char no browser support - specifies character to align cells to.

charoff no browser support - specifies offset of char character in pixels.

align specifies the horizontal alignment of cell contents.


<tfoot align="left"></tfoot>   <!-- align content to the left -->
<tfoot align="center"></tfoot>   <!-- align content in the centre -->
<tfoot align="right"></tfoot>   <!-- align content to the right -->
<tfoot align="justify"></tfoot>   <!-- stretch contents to width -->
<tfoot align="char"></tfoot>   <!-- align content to a character -->

valign specifies the vertical alignment of cell contents.


<tfoot valign="top"></tfoot>   <!-- align content to the top -->
<tfoot valign="middle"></tfoot>   <!-- align content in the middle -->
<tfoot valign="bottom"></tfoot>   <!-- align content to the bottom -->
<tfoot valign="baseline"></tfoot>   <!-- align to bottom when different font sizes -->

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<tfoot class="classname"></tfoot>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<tfoot id="idname"></tfoot>

style - specifies an inline style for the element allowing you to apply the style to the content.


<tfoot style="color:red;text-align:left"></tfoot>

title - specifies extra information about the content.


<tfoot title="information about the content"></tfoot>

Language Attributes

dir - specifies the directional flow of the content.


<tfoot dir="ltr"></tfoot>   <!-- The text will flow from left to right -->
<tfoot dir="rtl"></tfoot>   <!-- The text will flow from right to left -->

lang - specifies a language code for the content of the element.


<tfoot lang="en"></tfoot>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<tfoot xml:lang="fr"></tfoot>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<tfoot onkeydown="go()"></tfoot>   <!-- Executes the go() function -->

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<tfoot onkeypress="go()"></tfoot>   <!-- Executes the go() function -->

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<tfoot onkeyup="go()"></tfoot>   <!-- Executes the go() function -->

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<tfoot onclick="go()"></tfoot>   <!-- Executes the go() function --> 

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<tfoot ondblclick="go()"></tfoot>   <!-- Executes the go() function -->

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<tfoot onmousedown="go()"></tfoot>   <!-- Executes the go() function -->

onmousemove - The JavaScript code to be run when the mouse button is moved.


<tfoot onmousemove="go()"></tfoot>   <!-- Executes the go() function -->

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<tfoot onmouseout="go()"></tfoot>   <!-- Executes the go() function -->

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<tfoot onmouseover="go()"></tfoot>   <!-- Executes the go() function -->

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<tfoot onmouseup="go()"></tfoot>   <!-- Executes the go() function -->


<textarea> tag    << Prev          Next >>   <th> tag

go to home page Homepage go to top of page Top

HTML Elements

The complete set of HTML elements also known as HTML tags from the latest HTML 4.01 Specification.

Click the links for more information on individual tags and their attributes.

<!--...-->

<!DOCTYPE>

<a>

<abbr>

<acronym>

<address>

<applet>

<area />

<b>

<base />

<basefont />

<bdo>

<big>

<blockquote>

<body>

<br />

<button>

<caption>

<center>

<cite>

<code>

<col />

<colgroup>

<dd>

<del>

<dfn>

<dir>

<div>

<dl>

<dt>

<em>

<fieldset>

<font>

<form>

<frame />

<frameset>

<h1> - <h6>

<head>

<hr />

<html>

<i>

<iframe>

<img />

<input />

<ins>

<isindex />

<kbd>

<label>

<legend>

<li>

<link />

<map>

<menu>

<meta />

<noframes>

<noscript>

<object>

<ol>

<optgroup>

<option>

<p>

<param />

<pre>

<q>

<s>

<samp>

<script>

<select>

<small>

<span>

<strike>

<strong>

<style>

<sub>

<sup>

<table>

<tbody>

<td>

<textarea>

<tfoot>

<th>

<thead>

<title>

<tr>

<tt>

<u>

<ul>

<var>