HTML Tag <TH>

HTML Tag <TH>

<TH> Contains table cell headings. The <TH> tags are identical to the <TD> tags except that text inside <TH> is usually emphasized with boldface font and centered within the cell.

Attribute of <TH> Tag

ALIGN

Specifies how text within the table header will line up with the edges of the table cells, or if ALIGN=CHAR, on a specific character (the decimal point).

<TR> <TH><B>Television</B></TH> <TH> <IMG SRC="logo.gif" ALT="logo" BORDER=0> </TH> </TR>

Possible Values

LEFT, RIGHT, CENTER, JUSTIFY, CHAR



AXES

Lists AXIS values that pertain to the cell.

<TH AXES="TV, Programs"><B>Television</B></TH>

Possible Values

Any AXES name.



AXIS

Specifies an abbreviated cell name.

<TH AXIS="tuto"><B>Tutorial Subject</B></TH>

Possible Values

Any axis name.



BACKGROUND

Specifies the relative or absolute location of a graphic image file for the browser to load as a background graphic for the table cell.

<TH BACKGROUND="waves.gif">

Possible Values

URL



BORDERCOLOR

Indicates the color of the border of the table cell. You can specify the color with hexadecimal RGB values or by the color name.

<TR><TH BORDERCOLOR="Blue">

Possible Values

Color Name or Hexadecimal code.



BORDERCOLORDARK

Indicates the darker color used to form 3-D borders around the table cell. You can specify the color with its hexadecimal RGB values or with its color name.

<TH BORDERCOLORLIGHT=#FFFFFF BORDERCOLORDARK=#88AA2C>

Possible Values

Color Name or Hexadecimal code.



BORDERCOLORLIGHT

Indicates the lighter color used to form 3-D borders around the table cell. You can specify the color with its hexadecimal RGB values or with its color name.

<TH BORDERCOLORLIGHT=#FFFFFF BORDERCOLORDARK=#88AA2C>

Possible Values

Color Name or Hexadecimal code.



CHAR

Specifies the character on which cell contents align, if ALIGN="CHAR". If you omit CHAR=, the default value is the decimal point in the specified language.

<TH ALIGN="left" CHAR=",">

Possible Values

Any Character.



CHAROFF

Specifies the number of characters from the left at which the alignment character appears.

<TH ALIGN="CHAR" CHAR="," CHAROFF="7">

Possible Values

Number of Character (integer).



CLASS

Indicates which style class applies to the <TH> element.

<TH CLASS="dkm">Tutorial Subject: </TH>

Possible Values

Any Class Name.



ID

Assigns a unique ID selector to an instance of the <TH> tag. When you then assign a style to that ID selector, it affects only that one instance of the <TH> tag.

<TH ID="dkm">

Possible Values

Any ID Name.



NOWRAP

Disables default word-wrapping within a table cell, maximizing the the cell’s horizontal space.

<TH NOWRAP>The contents of this cell will not wrap at all</TH>

Possible Values

NOWRAP



ROWSPAN

Specifies that a table cell occupy more rows than the default of 1. This is useful if several rows of information relate to one category.

<TR><TH VALIGN=MIDDLE ALIGN=RIGHT ROWSPAN=3>Tutorial Subjects: </TH> <TD>PHP</TD> <TD>ASP</TD></TR> <TR><TD>JSP</TD> <TD>HTML</TD></TR> <TR><TD>CSS</TD> <TD>JavaScript</TD></TR>

Possible Values

Number of rows. (Integer)



STYLE

Specifies Style Sheet commands that apply to the contents of the table cell.

<TH STYLE="background: red">

Possible Values

CSS Property with value.



TITLE

Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the table header.

<TH TITLE="Table Cell Heading">

Possible Values

Any text message.



VALIGN

Aligns the contents of a cell with the top, bottom, baseline, or middle of the cell.

<TH VALIGN=TOP><IMG SRC="images/bud.gif" BORDER=0></TH>

Possible Values

TOP, MIDDLE, BOTTOM, BASELINE



WIDTH

Specifies the horizontal dimension of the cell in pixels or as a percentage of the table width.

<TH WIDTH=200 ALIGN=LEFT><H2>Tutorial</H2></TH>

Possible Values

Value in Pixel or percentage.




CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad