tfoot tag is the last section of a table, which formats the table footer : tfoot « Tags « HTML / CSS






tfoot tag is the last section of a table, which formats the table footer

   


<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
      <title>A simple XHTML table</title>
   </head>
   <body>
      <table border = "1" width = "40%" summary = "summary">
         <tbody>
            <tr>
               <td>Apple</td>
               <td>$0.25</td>
            </tr>

            <tr>
               <td>Orange</td>
               <td>$0.50</td>
            </tr>

            <tr>
               <td>Banana</td>
               <td>$1.00</td>
            </tr>

            <tr>
               <td>Pineapple</td>
               <td>$2.00</td>
            </tr>
         </tbody>

         <tfoot>
            <tr>
               <th>Total</th>
               <th>$3.75</th>
            </tr>
         </tfoot>

      </table>

   </body>
</html> 

   
    
  








Related examples in the same category

1.'tfoot' defines table footer
2.table header foot
3.Style for table footer
4.Table footer style
5.Only header and footer have border
6.Add extra row to the footer
7.Style for table footer: background, color and font
8.Selecting cells in foot
9.tfoot td border: thin solid black;text-align: center;font-weight: bold;
10.tfoot th, tfoot td {border-top: 2px solid #666; color: #363;}