Table Footers and Table Rows

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-html-css/lessons/tables/exercises/table-footer

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

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>

No it’s not necessary :slight_smile:,

<tfoot>

</tfoot>

tags are not mandatory

Okay cool,

Thanks for responding!

1 Like

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