The <THEAD> element is a new tag used in HTML.It is used to group header rows that define the tables header.This tag should appear inside the <table> tag. It is useful in case of large tables that span across multiple pages in a document.The table header defined by the <Thead> tag will appear on each page of the document where the table is displayed.
There can be only one <THEAD> element in a table which must follow the main Table command.
The following example explains the use of <THEAD> element.
|
<HTML> <HEAD> <TITLE>Use of Table Header</TITLE> </HEAD> <BODY> <TABLE Border="1"> <THEAD Bgcolor="lightgreen"> <TR> <TD>First cell </TD> <TD>Second cell </TD> </TR> </TABLE> </BODY> </HTML> |
You can specify the desired settings to the multiple table header rows through various attributes defined in <THEAD> tag are:
Align-This attribute sets the horizontal alignment of cells in the header. The possible values are left, center, right, and justify.
Valign-It sets the vertical alignment of cells in the header. It can have values as top, middle, bottom, or baseline.
Char-The char attribute specifies a character to which the content in the table header will be aligned.
Bgcolor-It sets the background colour of the cells in the header, given as the name of the colour, the RGB value, or the hexadecimal code.
<TFOOT> TAG
The <TFOOT> tag defines a group of footer rows in a table. A table footer provides footnotes or a summary row that appears at the bottom of a table. The basic tag is written like this: <TFOOT>...</TFOOT> with the table foot elements nested between the opening and closing tags. A table can have only one <TFOOT> tag, which must appear after the <Thead> and
| THead Tag | |
|---|---|
|
Type: Container tag Function: To group header rows Syntax: <Thead>...</Thead> Used within tags: Table | |
| TFoot Tag | |
|---|---|
|
Type: Container tag Function: To group Footer rows Syntax: <TFoot>...</TFoot> Used within tags: <Table> |
|
Learning computers with K ips