HTML - статьи

TH


Description

The TH element defines a header cell as part of the TABLE construct.

The browser should render the table to cause some difference between

TH elements and TD elements.

Both TH and TD elements can exist in any

one of the three table sections: THEAD, TFOOT, or TBODY.

Minimum Attributes

<TH>

All Possible Attributes

<TH

LANG="..."

DIR=ltr|rtl

ID="..."



CLASS="..."

AXIS="..."

AXES="..."

NOWRAP

ROWSPAN=value

COLSPAN=value

ALIGN=left|right|center|justify|char|decimal

CHAR="..."

CHAROFF="..."

DP="..."

VALIGN=top|middle|bottom|baseline

WIDTH=value

BGCOLOR="...">characters...</TH>

Elements Allowed Within...

members of group

Allowed In Content Of...

Variations

The TH element is part of the proposed TABLE construct.

A browser is to assume the table cell ends with the beginning

of the next table cell or the beginning of another table row

or the end of the enclosing TABLE, THEAD, TFOOT, or TBODY element

and thus a closing tag is not required.

This element is an extension in Netscape 1.1 and MS Internet Explorer 2.0.

Most browsers typically render the TH element in bold font,

but otherwise identical to TD elements.

The values justify|char for the ALIGN attribute

are new and are not widely implemented.

The table proposal states that a browser may display

ALIGN=justify the same as the default

ALIGN=left if it lacks support for text justification.

The AXIS and AXES attributes for cells provide a means for defining

concise labels for cells, either for speech rendering, or for

database field names.

The attribute AXIS defaults to the cell contents.

The AXES is a comma separated list of axis names which together

identify the row and column headers that pertain to this cell.

The NOWRAP attribute will suppress word wrap in the cell.

The ROWSPAN and COLSPAN attributes define the integer number of rows and

columns spanned by the cell. A value of zero for either implies the


cell spans from this cell to the end of the table.

The attribute DP is from an earlier version of the proposal and

was used with a value of decimal on the ALIGN attribute.

It has been replaced with the CHAR and CHAROFF attributes

used when ALIGN=char.

CHAR specifies a single character to be used for alignment, and

defaults to the decimal point in the current language.

CHAROFF specifies the offset, in the DIR direction, to the first

occurrence of the CHAR character on each line. If a line doesn't

include the CHAR character, it is to end at the CHAROFF position.

The default value for CHAROFF is either 50% or whatever will cause

the CHAR characters in all cells with a declared CHAR in a column to align.

The default units is pixels, but may be specified by a suffix on the number.

The standard defined units suffixes include:

pt=points,

pi=picas,

in=inches,

cm=centimeters,

mm=millimeters,

em=em units,

px=screen pixels.

In addition the suffix of a percentsign may be used to specify the

percentage offset within the cell.

The VALIGN attribute defines the vertical alignment of the cell contents.

The ALIGN, CHAR and CHAROFF attribute values may be inherited from

other table elements in the following order:

cells < columns < column groups < rows < row groups < default.

The VALIGN, LANG and DIR attribute values may be inherited from

other table elements in the following order:

cells < rows < row groups < columns < column groups < table < default.

The WIDTH attribute is a Netscape extension.

The BGCOLOR attribute is a MS Internet Explorer 2.0 extension.

Internet Explorer accepts either an "#rrggbb" number or

the following color names:

Black, Maroon, Green, Olive, Navy, Purple, Teal, Gray, Silver, Red, Lime,

Yellow, Blue, Fuchsia, Aqua, White.


Содержание раздела