
The Complete Idiot's HTML Tag Reference
| Index
| Previous Tag: <TFOOT>
| Next Tag: <THEAD>
|
<TH>
Defines a header cell within a table.
Support:
-
Notes:
- This tag requires the </TH> end tag.
Attributes:
- ABBR
= "Text"
An abbreviation of the cell's content.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
Not supported |
Not supported |
- ALIGN
= "Text"
The horizontal alignment of text within the cell.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.0 and later |
2.0 and later |
1.1 and later |
Notes:
-
Possible values: LEFT, CENTER, RIGHT.
- AXIS
= "Text"
A comma-separated list of one or more categories to which the cell belongs.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
Not supported |
Not supported |
- BACKGROUND
= "Text"
A filename or URL for an image upon which the cell text and images will appear.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
Not supported |
3.0 and later |
4.0 and later |
Notes:
-
If the image is smaller than the cell, the browser will display multiple copies of the imagethis is called tilingso that it fills the entire cell.
- Make sure the image you choose doesn't obscure your cell text.
- BGCOLOR
= "Color value"
The color to use for the cell background.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
2.0 and later |
3.0 and later |
Notes:
-
Use either an RGB value or a color name.
- Try to use a color that's compatible with the color you're using for your cell text.
- This attribute is deprecated.
- BORDERCOLOR
= "Color value"
The color of the cell border.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
Not supported |
2.0 and later |
Not supported |
Notes:
- BORDERCOLORDARK
= "Color value"
The color of the border on the bottom and right side of the cell.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
Not supported |
2.0 and later |
Not supported |
Notes:
-
Use either an RGB value or a color name.
- This attribute gives you control over the colors used in creating the border's 3-D effect.
- BORDERCOLORLIGHT
= "Color value"
The color of the border on the top and left side of the cell.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
Not supported |
2.0 and later |
Not supported |
Notes:
-
Use either an RGB value or a color name.
- This attribute gives you control over the colors used in creating the border's 3-D effect.
- CHAR
= "Text (single character)"
The common character upon which data in the cell will be aligned.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
Not supported |
Not supported |
Notes:
-
The default character is the decimal point.
- CHAROFF
= Positive integer
The amount of space, in pixels, between the cell's left edge and the first occurrence of the character specified by CHAR.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
Not supported |
Not supported |
Notes:
-
If you use the <BDO> tag to change the text direction to right-to-left, then this offset is measured from the right edge of the cell.
- CLASS
= "Text"
The style sheet class used by the tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
3.0 and later |
4.0 and later |
Notes:
-
You can specify two or more classes; be sure to separate each class name with a space.
- COLSPAN
= Positive integer
The number of columns in the table that the cell will span.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.0 and later |
2.0 and later |
1.1 and later |
- HEADERS
= "Text"
A space-separated list of header cells (as given by their ID attribute values) that provide header info for the cell.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
Not supported |
Not supported |
- HEIGHT
= Positive integer
The recommend height of the cell, in pixels.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.2 and later |
2.0 and later |
1.1 and later |
Notes:
- ID
= "Text"
An alphanumeric string that uniquely identifies the tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
3.0 and later |
4.0 and later |
Notes:
-
Although you can use letters and numbers for the ID, the first character must be a letter.
- LANG
= "Text"
The language used by the tag's attribute values and text content.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
Not supported |
- NOWRAP
Controls whether cell text is automatically wrapped at the right edge of the cell.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.0 and later |
2.0 and later |
1.1 and later |
Notes:
-
When this attribute is present, the browser will only start a new line when you use the <BR> tag.
- This attribute is deprecated.
- ROWSPAN
= Positive integer
The number of rowss in the table that the cell will span.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.0 and later |
2.0 and later |
1.1 and later |
- SCOPE
= "Text"
The data cells for which the current cell provides header info.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
Not supported |
Not supported |
Notes:
-
Use any of the following values:
COL |
The cell provides header info for its own column. |
ROW |
The cell provides header info for its own row. |
COLGROUP |
The cell provides header info for its own column group. |
ROWGROUP |
The cell provides header info for its own row group. |
- STYLE
= "Text"
The style or styles to use with the tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
3.0 and later |
4.0 and later |
Notes:
-
If you enter multiple style properties, separate each one with a semi-colon (;).
- VALIGN
= "Text"
The vertical alignment of text within the cell.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.0 and later |
2.0 and later |
1.1 and later |
Notes:
-
Possible values: TOP, MIDDLE, BOTTOM, BASELINE.
- WIDTH
= Positive integer
The recommend width of the cell, in pixels.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.2 and later |
2.0 and later |
1.1 and later |
Notes:
Example:
<TABLE BORDER>
<CAPTION ALIGN=TOP>Table 1. Bernard Lavery's humungofoods.</CAPTION>
<TR>
<TH>Comestible <TH>Size<TH> Year
<TR>
<TD>Cabbage<TD>124 pounds<TD>1989
<TR>
<TD>Carrot<TD>6 feet, 10 ½ inches<TD>1991
<TR>
<TD>Celery<TD>46 pounds, 1 ounce<TD>1990
<TR>
<TD>Cucumber<TD>20 pounds, 1 ounce<TD>1991
<TR>
<TD>Marrow<TD>108 pounds, 2 ounces<TD>1990
<TR>
<TD>Parsnip<TD>14 feet, 3 ¾ inches<TD>1990
<TR>
<TD>Zucchini<TD>64 pounds, 8 ounces<TD>1990
</TABLE>
How It Looks:
Table 1. Bernard Lavery's humungofoods.
Comestible | Size | Year
|
Cabbage | 124 pounds | 1989
|
Carrot | 6 feet, 10 ½ inches | 1991
|
Celery | 46 pounds, 1 ounce | 1990
|
Cucumber | 20 pounds, 1 ounce | 1991
|
Marrow | 108 pounds, 2 ounces | 1990
|
Parsnip | 14 feet, 3 ¾ inches | 1990
|
Zucchini | 64 pounds, 8 ounces | 1990
|
| Index
| Previous Tag: <TFOOT>
| Next Tag: <THEAD>
|
|