Pr.Pg Next Pg

<TH>Ö.</TH> tag tutorials

  • This is a paired tag. It requires opening and closing tags.

  • This stands for Table Header. This tag is used to display text in bold and in Center. Most of the attributes are same as <TABLE> tag element. Attributes specified with <TH> works only for particular CELL.

 

Sr No

Attributes

Descriptions

1

WIDTH

No of Pixel or Screen%

2

HEIGHT

No of Pixel or Screen%

3

ALIGN

LEFT/RIGHT/CENTER

4

BGCOLOR

COLOR NAME or hexadecimal color

5

COLSPAN

For merging the columns

6

ROWSPAN

For merging the rows

 

  • Some time attributes of TH work different on different browser so be aware which browser you are using and check in your browser is it working properly.

 

Syntax:

<body>

<table>

<tr><th>columns header</th></tr>

</table>

</body>

 

Example: HTML program to demonstrate the th tag

Output: Letís see the output in Google chrome browser:
Output: Now letís see the output in Internet Explorer:
Output: Now letís see the output in Firefox:
Pr.Pg border                                              Next Pg