Learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/step-27

2019 2020 2021 Total Net Worth $-171 $136 $334

I am getting this error: Your tr should have a th element.

What am i doing wrong?

this is my code

              <tr>
              <td></td>
              <th><span class="sr-only">2019</span></th>
              <th><span class="sr-only">2020</span></th>
              <th><span class="sr-only">2021</span></th>
              </tr class="total">
              <th>Total <span class="sr-only">Net Worth</span>
              <td>$-171</td>
              <td>$136</td>
              <td class="current">$334</td>
              </th>
              </tr>
            </thead>
            <tbody>

Post your code using three ``` back ticks before and after your code in a separate line and link your topic to the challenge step.

<tr>
              <td></td>
              <th><span class="sr-only">2019</span></th>
              <th><span class="sr-only">2020</span></th>
              <th><span class="sr-only">2021</span></th>
              </tr class="total">
              <th>Total <span class="sr-only">Net Worth</span>
              <td>$-171</td>
              <td>$136</td>
              <td class="current">$334</td>
              </th>
              </tr>
            </thead>
            <tbody>

I would reset the step to get the original HTML back. When you do that, you should see the following:

            <thead>
              <tr>
              <td></td>
              <th><span class="sr-only">2019</span></th>
              <th><span class="sr-only">2020</span></th>
              <th><span class="sr-only">2021</span></th>
              </tr>
            </thead>
            <tbody>
            </tbody>

Notice that there is an empty tbody element that begins on line 108. That is where you want to add the new elements. Do not change anything that is already there. Just add the new elements inside the empty tbody element.

Thankyou. It worked.

1 Like