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
|
<!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>TR - Table Row</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 TR element for table rows.">
<meta name="keywords" content="TR, tr element, table row, rows, table rows, table, tables, HyperText Markup Language, HTML, HTML4, HTML 4.0, Web Design Group, WDG, <tr> tag, <TR> tag">
<script type="text/javascript" src="../hideNonStrict.js"></script>
</head>
<body>
<h2><img src="../wdglogo1.gif" width=250 height=83 alt="The Web Design Group"></h2>
<h1>TR - Table Row</h1>
<script type="text/javascript">
<!--
if (document.styleSheets && writeButton) {
writeButton("attributes");
}
// -->
</script>
<table>
<tr valign=top>
<th>Syntax</th>
<td><strong class=required><TR></strong>...</TR></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 class=transitional>BGCOLOR=<var><a href="../values.html#color">Color</a></var> (row background color)</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="th.html">TH</a> or <a href="td.html">TD</a> elements</td>
</tr>
<tr valign=top>
<th>Contained in</th>
<td><a href="thead.html">THEAD</a>, <a href="tfoot.html">TFOOT</a>, <a href="tbody.html">TBODY</a></td>
</tr>
</table>
<p>The <strong class=html>TR</strong> element defines a <em>table row</em>. <strong class=html>TR</strong> elements must be contained within a <em>row group</em> defined by <strong class=html><a href="thead.html">THEAD</a></strong>, <strong class=html><a href="tfoot.html">TFOOT</a></strong>, or <strong class=html><a href="tbody.html">TBODY</a></strong>. Since the start and end tags of <strong class=html>TBODY</strong> are optional when the table has one <strong class=html>TBODY</strong> and no <strong class=html>THEAD</strong> or <strong class=html>TFOOT</strong>, the simple table structure of <a href="../../wilbur/index.html">HTML3.2</a> is still valid:</p>
<pre class=example><code class=html><TABLE>
<strong><TR></strong>
<TH>Abbreviation</TH>
<TH>Long Form</TH>
<strong></TR></strong>
<strong><TR></strong>
<TD>AFAIK</TD>
<TD>As Far As I Know</TD>
<strong></TR></strong>
</TABLE></code></pre>
<p><strong class=html>TR</strong> contains <strong class=html><a href="th.html">TH</a></strong> or <strong class=html><a href="td.html">TD</a></strong> elements, which in turn contain the actual data of the table. In addition to the <a href="../attrs.html">attributes common to most elements</a>, <strong class=html>TR</strong> takes presentational attributes for specifying the alignment of cells within the row<span class=transitional> and the row's background color</span>.</p>
<p>The <strong class=html>ALIGN</strong> attribute specifies the horizontal alignment for each cell in the row. 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>
<div class=transitional>
<p>The <a href="../deprecated.html">deprecated</a> <strong class=html>BGCOLOR</strong> attribute suggests a background color for the row. The combination of this attribute with <strong class=html><<a href="../special/font.html">FONT</a> COLOR=<var>...</var>></strong> can leave invisible or unreadable text on Netscape Navigator 2.<var>x</var>, which does not support <strong class=html>BGCOLOR</strong> on table elements. <strong class=html>BGCOLOR</strong> is dangerous even on supporting browsers, since most fail to override it when overriding other author-specified colors. <a href="../../css/index.html">Style sheets</a> provide a safer, more flexible method of specifying a row's background color.</p>
</div>
<h2>More Information</h2>
<ul>
<li><a href="http://www.w3.org/TR/REC-html40/struct/tables.html#edef-TR">TR in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTML4.0 Recommendation</a></li>
<li><a href="http://www.w3.org/TR/REC-html32#table">TR in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTML3.2 Recommendation</a></li>
<li><a href="../../wilbur/table/tr.html">TR in <abbr class=initialism title="Web Design Group">WDG</abbr> HTML3.2 Reference</a></li>
<li><a href="http://www.malibutelecom.com/yucca/HTML3.2/5.59.html">TR in <cite>Learning HTML3.2 by Examples</cite></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>
|