In this discussion, We will introduce about the use of <tfoot> tag in html5.
In this discussion, We will introduce about the use of <tfoot> tag in html5.In this discussion, We will introduce about the use of <tfoot> tag in html5. This tag is used to specify the group of footer content of the table body. In the table we must have zero or more <tr> tag inside the <tfoot> tag. The <tfoot> tag is used in conjunction with <tbody>, <thead> in the <table> tag. The <tfoot> tag must have one or more <td> tag within <tr> tag which is nested in <tfoot>. The <tfoot> tag is the child of <table> tag and used after the <caption>, <colgroup>, <thead> tag and before the <tbody> tag. This tag must have opening and closing tags.
the syntax of the <tfoot> tag is as:
<tfoot>One or more tr, td tag</tfoot> |
This tag don't have any specific attribute.
Example: tfoot_tag.html.
<!DOCTYPE html> <html> <head> <title>Example of tfoot tag</title> </head> <body>Example for tfoot tag.<p> <table border="1"> <thead> <tr> <th>NAME</th> <th>Sr. name</th> </tr> </thead> <tfoot> <tr> <td>footer1</td> <td>footer2</td> </tr> </tfoot> <tbody> <tr> <td> Gyan</td> <td> Singh</td> </tr> <tr> <td> Ankit</td> <td> Kumar</td> </tr> </tbody> </table> </body> </html> |
Output:
Difference between html4.01 and html5.
None