Last Updated on April 26, 2023 by Roshan Parihar
Definition of HTML tfoot tag
HTML tfoot tag is used in tables to show table footer.
We use HTML tr tag to show table footer rows, HTML td tag to show table footer cells.
Table of Content
Syntax:
1 |
<tfoot>table element with content comes here...</tfoot> |
The tfoot tag is the HTML element used to show bottom part of tables. It has rows with footer cells.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<p>Company revenue from different brands:</p> <table> <tr> <th>Sr. No.</th> <th>Name</th> <th>profit(in $)</th> </tr> <tr> <td>1</td> <td>Samsung</td> <td>20000</td> </tr> <tr> <td>2</td> <td>Nokia</td> <td>30000</td> </tr> <tfoot> <tr> <td colspan="2">Total profit</td> <td>50000</td> </tr> </tfoot> </table> |
Output
Company revenue from different brands:
Sr. No. | Name | profit(in $) |
---|---|---|
1 | Samsung | 20000 |
2 | Nokia | 30000 |
Total profit | 50000 |
Resources and References
1. W3C Specification.
2. HTML living standard
3. W3C project using Github