Table Footers and Table Rows


#1


https://www.codecademy.com/courses/learn-html-css/lessons/tables/exercises/table-footer

My Question is:

Is it necessary to insert a Table Row within a Table Footer, or can we omit the Table Row, as long as we add the Table Data within the Table Footer?

Because the example in this section showed an example with a table row within a table footer. However, when I completed the exercise, I omitted the table row, and only included table data within my table footer, and the code worked just fine.

Thanks again!

This is the sample given in this exercise (notice there's a table row included): 
 <tfoot>
    <tr>
      <th>Total</th>
      <td>$22M</td>
      <td>$12.5M</td>
    </tr>
  </tfoot>


This is what is asked to do in this exercise:
"Add a table footer at the bottom of the table using the <tfoot> element. Inside of the footer, add the following data:"

<td>Total</td>
<td>28</td>


This is my code:
<tfoot>
      <td>Total</td>
      <td>28</td>
    </tfoot>


#2

No it's not necessary :slight_smile:,

<tfoot>

</tfoot>

tags are not mandatory


#3

Okay cool,

Thanks for responding!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.