HTML - Tags - <tfoot>

#134 of 147
tfoot

 <html>
 <body>
     <table>
         <caption>Population by Country</caption>
         <colgroup>
             <col>
             <col span="2" style="background-color:lightgreen">
             <col>
         </colgroup>
         <thead>
             <tr>
                 <th>Country</th>
                 <th>Pop</th>
                 <th>Pop 2030</th>
                 <th>% change</th>
             </tr>
         </thead>
         <tbody>
             <tr>
                 <td>China</td>
                 <td>1.38 billion</td>
                 <td>1.41 billion</td>
                 <td>2.1%</td>
             </tr>
         </tbody>
         <tfoot>
             <tr>
                 <td>Total</td>
                 <td>3 billion</td>
                 <td>3.3 billion</td>
                 <td>10%</td>
             </tr>
         </tfoot>
     </table>
 </body>
 </html>
 

The tfoot element contains footer information for the table element.

A live example:


Population by country
Country Pop Pop 2030 % change
China 1.38 billion 1.41 billion 2.1%
India 1.31 billion 1.53 billion 16.8%
USA 322 million 356 million 10.6%
Total 3 billion 3.3 billion 10%

N of

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath