Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Allyson Bliss
Allyson Bliss
915 Points

Problem with Table Challenge, Task 4

The challenge is to put two header cells with any text "inside of the row you just created." I keep getting an error message that says "Header cells must be inside of a table row and have text in them." Isn't that exactly what I did below?

<table border="1">
    <thead> 
  <tr>
    <th>My Cats</th>
  </tr>
  <tr>
    <th>Your Cats</th>
    <th>His Cats</th>
  </tr>
  </thead>
  <tr>
    <td>Poppy</td>
  </tr>
  <tr>
    <td>Bruno</td>
  </tr>
</table>

3 Answers

critstix
critstix
2,860 Points

I only started today myself but the only thing i can see is that it might be that you have 2 separate groups of table rows. One with one table header and another with 2 table headers. I think it is looking for just the 2 table headers in the first instance of the table row. I may be wrong but this will be a learning exercise in debugging for me ><

I believe what Simon said is right. You have two rows right now with two sets of headers. So the validation is kicking in and only seeing the first header. Try deleting

  <tr>
    <th>My Cats</th>
 </tr>
David Lane
David Lane
33,414 Points

Yep, delete this section and it will pass.

Allyson Bliss
Allyson Bliss
915 Points

That did it. Thanks!