<td>One or more <a href="tr.html">TR</a> elements</td>
</tr>
<tr valign=top>
<th>Contained in</th>
<td><a href="table.html">TABLE</a></td>
</tr>
</table>
<p>The <strong class=html>TBODY</strong> element defines a <em>group of data rows</em> in a table. A <strong class=html><a href="table.html">TABLE</a></strong> must have one or more <strong class=html>TBODY</strong> elements, which must follow the optional <strong class=html><a href="tfoot.html">TFOOT</a></strong>. The <strong class=html>TBODY</strong> end tag is always optional. The start tag is optional when the table contains only one <strong class=html>TBODY</strong> and no <strong class=html><a href="thead.html">THEAD</a></strong> or <strong class=html><a href="tfoot.html">TFOOT</a></strong>. This allows the simple table structure of <a href="http://www.htmlhelp.com/reference/wilbur/">HTMLá3.2</a> to still be valid:</p>
<pre class=example><code class=html><TABLE>
<TR>
<TH>Abbreviation</TH>
<TH>Long Form</TH>
</TR>
<TR>
<TD>AFAIK</TD>
<TD>As Far As I Know</TD>
</TR>
</TABLE></code></pre>
<p>By explicitly grouping rows with <strong class=html>THEAD</strong>, <strong class=html>TFOOT</strong>, and <strong class=html>TBODY</strong>, authors give browsers the ability to present a long table with a scrolling body and static header and footer rows. Using <strong class=html>TBODY</strong> also provides the ability to easily suggest different presentations for different row groups through <a href="http://www.htmlhelp.com/reference/css/">style sheets</a>. While few browsers currently support <strong class=html>TBODY</strong>, it can be used with no harm on non-supporting browsers.</p>
<p>The following example gives a table of <abbr class=initialism title="International System">SI</abbr> units of measure. <strong class=html>TBODY</strong> elements are used to group rows based on whether the unit is classed as a "base" unit, "derived" unit, or "supplementary" unit.</p>
<pre class=example><code class=html><TABLE SUMMARY="This table lists SI (International System) units of
measure, giving the name of the unit, its symbol, and
the quantity that it measures.">
<CAPTION>SI Units</CAPTION>
<THEAD>
<TR>
<TH SCOPE=col>Name</TH>
<TH SCOPE=col>Symbol</TH>
<TH SCOPE=col>Quantity</TH>
</TR>
</THEAD>
<strong><TBODY CLASS=base></strong>
<TR>
<TD SCOPE=row>meter</TD>
<TD>m</TD>
<TD>length</TD>
</TR>
<TR>
<TD SCOPE=row>kilogram</TD>
<TD>kg</TD>
<TD>mass</TD>
</TR>
<var>...</var>
<strong></TBODY></strong>
<strong><TBODY CLASS=derived></strong>
<TR>
<TD SCOPE=row>hertz</TD>
<TD>Hz</TD>
<TD>frequency</TD>
</TR>
<TR>
<TD SCOPE=row>pascal</TD>
<TD>Pa</TD>
<TD>pressure</TD>
</TR>
<var>...</var>
<strong></TBODY></strong>
<strong><TBODY CLASS=supplementary></strong>
<TR>
<TD SCOPE=row>radian</TD>
<TD>rad</TD>
<TD>plane angle</TD>
</TR>
<var>...</var>
<strong></TBODY></strong>
</TABLE></code></pre>
<p>In addition to the <a href="../attrs.html">attributes common to most elements</a>, <strong class=html>TBODY</strong> takes presentational attributes for specifying the alignment of cell data. Since few browsers support <strong class=html>TBODY</strong>, authors may wish to specify these attributes on the <strong class=html><a href="tr.html">TR</a></strong> or <strong class=html><a href="td.html">TD</a></strong> elements instead.</p>
<p>The <strong class=html>ALIGN</strong> attribute specifies the horizontal alignment for each cell in the row group. Possible values are <strong class=html>left</strong>, <strong class=html>center</strong>, <strong class=html>right</strong>, <strong class=html>justify</strong>, and <strong class=html>char</strong>. <strong class=html>ALIGN=char</strong> aligns a cell's contents on the character given in the <strong class=html>CHAR</strong> attribute. The default value for the <strong class=html>CHAR</strong> attribute is the decimal point of the current language--a period in English. The <strong class=html>CHAROFF</strong> attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; <strong class=html>CHAROFF="50%"</strong> centers the alignment character horizontally in a cell.</p>
<p>The <strong class=html>VALIGN</strong> attribute specifies the vertical position of a cell's contents. Possible values are:</p>
<ul>
<li><strong class=html>top</strong>, which positions data at the top of the cell;
<li><strong class=html>middle</strong>, the default value, which centers the cell data vertically;
<li><strong class=html>bottom</strong>, which positions data at the bottom of the cell;
<li><strong class=html>baseline</strong>, which specifies that the first line of each cell in the row with <strong class=html>ALIGN=baseline</strong> should occur on a common baseline.</li>
</ul>
<h2>More Information</h2>
<ul>
<li><a href="http://www.w3.org/TR/REC-html40/struct/tables.html#edef-TBODY">TBODY in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTMLá4.0 Recommendation</a></li>
</ul>
<div class=footer>
<address>Maintained by <a href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</a> <<a href="mailto:liam@htmlhelp.com">liam@htmlhelp.com</a>></address>