In principle, the end tag </TH> can always be omitted. This is not recommendable, since some browsers (including Netscape) may act incorrectly when the end tag is omitted.
attribute name | possible values | meaning | notes |
---|---|---|---|
NOWRAP | NOWRAP | suppress word wrap | equivalent to using non-breaking spaces, , instead of normal spaces within the contents of the cell; this attribute is deprecated in HTML 4.0 |
ROWSPAN | integer | number of rows spanned by the cell | default is 1 |
COLSPAN | integer | number of columns spanned by the cell | default is 1 |
ALIGN | LEFT, CENTER, RIGHT | horizontal alignment of data in the cell | default is CENTER or the ALIGN attribute in an enclosing TR element |
VALIGN | TOP, MIDDLE, BOTTOM | vertical alignment of data in the cell | overrides a VALIGN attribute in an enclosing TR element |
WIDTH | integer | suggested width of the cell, in pixels | the browser should use the value unless it conflicts with the width requirements for other cells in the same column; although many browsers also support percentage widths in this context, they do it rather inconsistently; and browsers implement even HTML 3.2 conformant WIDTH attributes differently in many cases, especially when you try to make some columns fixed width and other columns occupy the rest of the available total width; this attribute is deprecated in HTML 4.0 |
HEIGHT | integer | suggested height of the cell, in pixels | the browser should use the value unless it conflicts with the height requirements for other cells in the same row; this attribute is deprecated in HTML 4.0 |
The TD and TH elements are very similar; in particular, they have the same attributes. The TD element is for data in a table whereas the TH element is for headings of columns or rows in a table. The visible differences are: