Computer Applications
How do you create different table section ?
HTML Advanced Features
7 Likes
Answer
The <THEAD>
, <TBODY>
and <TFOOT>
tags are used to divide HTML tables in different sections. While the <THEAD>
and <TFOOT>
tags define the header and footer sections , the <TBODY>
tag defines the body section of the table.
Consider the following example:
<HTML>
<BODY>
<TABLE>
<THEAD BGCOLOR = "PINK">
<TR>
<TD> Header </TD> <TD> Header </TD>
</TR>
</THEAD>
<TBODY BGCOLOR = "YELLOW">
<TR>
<TD> Body cell data </TD> <TD> Body cell data </TD>
</TR>
<TR>
<TD> Body cell data </TD> <TD> Body cell data </TD>
</TR>
</TBODY>
<TFOOT>
<TR>
<TD> Footer </TD> <TD> Footer </TD>
</TR>
</TFOOT>
</TABLE>
</BODY>
</HTML>
Answered By
2 Likes