Computer Applications

Differentiate between <TH> and <THEAD> tag.

HTML Advanced Features

7 Likes

Answer

<TH> tag<THEAD> tag
<TH> tag is used to specify column heading by making the heading text bold.<THEAD> tag is used to group header rows that define the table's header. The table header defined by the <THEAD> tag will appear on each page of the document where the table is displayed.
<TH> tag should be enclosed within <TR> tag.<THEAD> tag should be enclosed within <TABLE> tag.
For example,
<TABLE>
<TR>
<TH BGCOLOR = "PINK">Input Devices</TH>
<TH BGCOLOR = "PINK">Output Devices</TH>
</TR>
<TR>
<TD>Mouse </TD>
<TD>Monitor </TD>
</TR>
<TR>
<TD>Keyboard </TD>
<TD>Printer </TD>
</TR>
</TABLE>
For example,
<TABLE>
<THEAD BGCOLOR = "PINK">
<TR>
<TD>Input</TD>
<TD>Output</TD>
</TR>
<TR>
<TD>Devices</TD>
<TD>Devices</TD>
</TR>
</THEAD>
<TR>
<TD>Mouse </TD>
<TD>Monitor </TD>
</TR>
<TR>
<TD>Keyboard </TD>
<TD>Printer </TD>
</TR>
</TABLE>

Answered By

4 Likes


Related Questions