You are here:  NetStrider » Tutorials » HTMLRef » Tables » TR «
<TR> Command

Command Syntax:

<TR command parameters>
  <TH>Header 1 Contents</TH>
  <TH>Header 2 Contents</TH>
  
. . .
</TR>
<TR command parameters>
  <TD>Cell 1 Contents</TD>
  <TD>Cell 2 Contents</TD>
  
. . .
</TR>

Defines a table row.  A table row can consist of header or data cells.  Generally these element types are not mixed within a table row.

Although the <TR> can make use of command attributes identical to those used for the <TD> and <TH> commands, parameters are generally not set at the table row level.

See also:  <TD>, <TH>.

Command Parameters:
Table row command attributes are identical with those used for the <TD> command except that a more limited set is permitted.

Allowable command parameters are:

align|valign and bgcolor.

Internet Explorer specific command parameters -

bordercolor, bordercolorlight and bordercolordark.

Example:
<center> <table width=90% cellpadding=4 cellspacing=0 border=1> <tr> <th align=center valign=center> <font size=3> Header One </font> </th> <th align=center valign=center> <font size=3> Header Two </font> </th> </tr> <tr> <td align=center valign=center> <font size=3> Cell One </font> </td> <td align=center valign=center> <font size=3> Cell Two </font> </td> </tr> </table> </center>
Yields -

Header One Header Two
Cell One Cell Two

Two table rows are defined in the table above.  One contains header cells and the other contains data cells.  The number of elements within all table rows must match precisely in order for the browser to display the table properly.

Note that no command parameters are set for either table row element.

Return to the HTML Reference Guide Section S:Z


HTML Reference Guide Table of Contents.
Author: Randy D. Ralph.  In place February 27, 1999.  Copyright © 1999 NetStrider.  Presented as a public service.




Hosted by uCoz