1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html lang=en-us>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>THEAD - Table Head</title>
<link rev=Made href="mailto:liam@htmlhelp.com">
<link rel=Start href="../index.html">
<link rel=StyleSheet href="../style.css" type="text/css">
<link rel=StyleSheet href="../aural.css" type="text/css" media=aural>
<meta name="author" content="Liam Quinn">
<meta name="description" content="A description of HTML 4.0's THEAD element for table heads.">
<meta name="keywords" content="THEAD, thead element, table head, heads, header, static, headers, header cells, row group, row groups, table rows, grouping, table, tables, HyperText Markup Language, HTML, HTML4, HTML 4.0, Web Design Group, WDG, <thead> tag, <THEAD> tag">
</head>
<body>
<h2><img src="../wdglogo1.gif" width=250 height=83 alt="The Web Design Group"></h2>
<h1>THEAD - Table Head</h1>
<table>
<tr valign=top>
<th>Syntax</th>
<td><strong class=required><THEAD></strong>...</THEAD></td>
</tr>
<tr valign=top>
<th>Attribute Specifications</th>
<td>
<ul>
<li>ALIGN=[ left | center | right | justify | char] (horizontal alignment of cells in group)</li>
<li>CHAR=<var><a href="../values.html#character">Character</a></var> (alignment character for cells)</li>
<li>CHAROFF=<var><a href="../values.html#length">Length</a></var> (alignment character offset)</li>
<li>VALIGN=[ top | middle | bottom | baseline] (vertical alignment of cells in group)</li>
<li><a href="../attrs.html">common attributes</a></li>
</ul>
</td>
</tr>
<tr valign=top>
<th>Contents</th>
<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>THEAD</strong> element defines a <em>group of header rows</em> in a table. A <strong class=html><a href="table.html">TABLE</a></strong> may have one <strong class=html>THEAD</strong>, which must follow any <strong class=html><a href="caption.html">CAPTION</a></strong>, <strong class=html><a href="col.html">COL</a></strong>, or <strong class=html><a href="colgroup.html">COLGROUP</a></strong> elements, and precede the optional <strong class=html><a href="tfoot.html">TFOOT</a></strong> and required <strong class=html><a href="tbody.html">TBODY</a></strong> elements.</p>
<p>By explicitly grouping header rows with <strong class=html>THEAD</strong>, authors give browsers the ability to include the header rows on each page of a printed, multi-page table, as well as the ability to present a long table with a scrolling body and static header rows. While few browsers currently support <strong class=html>THEAD</strong>, it can be used with no harm on non-supporting browsers.</p>
<p>The following example uses <strong class=html>THEAD</strong> to group the two header rows of a table:</p>
<pre class=example><code class=html><TABLE SUMMARY="This table gives the character entity reference,
decimal character reference, and hexadecimal character
reference for 8-bit Latin-1 characters, as well as the
rendering of each in your browser.">
<COLGROUP>
<COLGROUP SPAN=3>
<COLGROUP SPAN=3>
<strong><THEAD></strong>
<TR>
<TH SCOPE=col ROWSPAN=2>Character</TH>
<TH SCOPE=col ROWSPAN=2>Entity</TH>
<TH SCOPE=col ROWSPAN=2>Decimal</TH>
<TH SCOPE=col ROWSPAN=2>Hex</TH>
<TH SCOPE=colgroup COLSPAN=3>Rendering in Your Browser</TH>
</TR>
<TR>
<TH SCOPE=col>Entity</TH>
<TH SCOPE=col>Decimal</TH>
<TH SCOPE=col>Hex</TH>
</TR>
<strong></THEAD></strong>
<TBODY>
<TR>
<TD SCOPE=row>non-breaking space</TD>
<TD>&amp;nbsp;</TD>
<TD>&amp;#160;</TD>
<TD>&amp;#xA0;</TD>
<TD>&nbsp;</TD>
<TD>&#160;</TD>
<TD>&#xA0;</TD>
</TR>
<var>...</var>
</TBODY>
</TABLE></code></pre>
<p>In addition to the <a href="../attrs.html">attributes common to most elements</a>, <strong class=html>THEAD</strong> takes presentational attributes for specifying the alignment of cell data. Since few browsers support <strong class=html>THEAD</strong>, authors may wish to specify these attributes on the <strong class=html><a href="tr.html">TR</a></strong>, <strong class=html><a href="th.html">TH</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>VALIGN=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-THEAD">THEAD in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTML4.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>
<p class=toolbar><img src="../wdglogo-small.gif" width=105 height=40 alt="Web Design Group ~"> <a href="../index.html" rel=Start>HTML4.0Reference</a>~ <a href="../olist.html">ElementsbyFunction</a>~ <a href="../alist.html">ElementsAlphabetically</a></p>
<p class=copyright>Copyright © 1998 by <a href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</a>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at <a href="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</a>).</p>
</div>
</body>
</html>
|