HOME BACK NEXT MENU

 Tag Description:

-==--==--==--==--==-

<TR> Table Rows

Definition: The TR element lets you set default horizontal and vertical alignment of the row's cell contents. It also serves as a container for a row of table cells that are defined within the TD or TH elements. <TR> also allows you to disable the row's word wrap and use the <BR> element instead to determine line breaks (as well as cell widths).

Standard Attributes: CLASS, ID, LANG

Attributes:

ALIGN

You can use the ALIGN attribute to specify a horizontal alignment of paragraphs within a table row:

* align=left: Renders the paragraph flush left. The default for data cells (TD).

* align=center: Centers the paragraph. The default for header cells (TH).

* align=right: Renders the paragraph flush right.

* align=justify: Allows text lines to be justified where it's practical @md where it's not, it gives the same effect as the align=left setting.

Text lines are indented in a manner that makes the initial appearance of a decimal point on each line vertically aligned. When a line doesn't have a decimal point, it's centered for header cells and rendered flush left for data cells. If the ALIGN attribute isn't present, the default is overridden by the COLSPEC attribute on the TABLE element or the presence of an ALIGN attribute on the parent. The COLSPEC attribute takes precedence over the TR element.

DP

DP indicates what character is to be used for the ALIGN attribute's decimal point @md for example, dp="," or dp="." (this is the default). It is possible to change the default by the language context, as set by the LANG attribute on enclosing elements.

VALIGN

By using VALIGN, you can specify the explicit vertical alignment of the material within a table row:

* valign=top: Cell contents appear at the top of each cell. This is the default.

* valign=middle: Cell contents are centered vertically in each cell.

* valign=bottom: Cell contents appear at the bottom of each cell.

* valign=baseline: Use this when you want to make sure that all cells in the row with valign=baseline share the same baseline. The only place that this constraint applies is with the first text line for each cell.

NOWRAP

You can prevent the browser from automatically wrapping lines by using NOWRAP. If you would like to specify explicit line breaks, you can then do it by using the BR element.

Context: <TR> is legal within

<TABLE>

The following markup can be used within <TR>

<TH>, <TD>

Suggested style/usage: Close Tag: OPTIONAL

Examples:

<TABLE>
<CAPTION>A nice table</CAPTION>
<TR><TH>This</TH><TH>That</TH></TR>
<TR><TD>1</TD><TD>2</TD></TR>
</TABLE>

-==--==--==--==--==-
HOME BACK NEXT MENU

E-Mail: HTML for Dummies at html4dum@lanw.com
URL: http://www.lanw.com/html4dum/h4d2e/t0089.htm
Text - Copyright © 1995, 1996 Ed Tittel & Steve James.
For Dummies, the Dummies Man logo and Dummies Press are trademarks or registered trademarks of Wiley Publishing, Inc. Used with Permission.
Web Layout - Copyright © 1996, LANWrights
Revised -- May, 2002 [MCB]