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!

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

General Discussion

Having trouble with a code challenge

Having trouble with the table code challenge that says, "Put two header cells with any text inside of the row you just created." Not sure what it means. This is the code I have so far:

<!DOCTYPE html> <html> <head> <title>HTML Tables Challenge</title> </head> <body> <h1>HTML Tables Challenge</h1>

<!-- Write your code below -->

<table> <tr> <thead><td></td></thead> <td></td> <td></td> </tr> </table

</body> </html>

7 Answers

k robinson
k robinson
3,684 Points

looks like u were missing a / in the closing table

I'm pretty tired but I'm guessing it means this...

         <th> A table head </th>       
         <th> Another table head </th>  
         <td> Normal table data </td>
         <td> Normal table data </td>

aaaaannnddd it would seem the code markdown didn't work facepalm. Never used them before and about to go sleep, sorry bout that :)

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hello Jason,

I believe the solution Joe provided is what you're looking for. To create header cells you need to use the <th> element inside a row. Check this out as a reference.

I hope this helps.

I can't figure out how to copy my code here. I made the changes you guys suggested and I feel like my answer is right but it is still failing me. Kinda hard to have a discussion about it without pasting code here.

Still having trouble. Here is what I have so far... http://i.imgur.com/s6kBQr7.png

I'm sure you already got past this part, but I had the same problem and finally figured it out. What they're asking is for you to add another header next to the one you've already created; that is, add a second header to the right/in the next cell. Why they worded it the way they did is beyond me.

Switch your thead tags to th tags and your code should work. I think thead is only supposed to be used so browsers can recognize it or whatever.

I am struggling with it too please help: put two header cells with any text inside of the row you just ceated.

           <th>wrong answer</th>
           <th>wrong too</th>
I tried different things but I am still stuck.