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 HTML Tables HTML Tables

David Rajewski
David Rajewski
4,297 Points

Table Header Problem?

I am on the table header code challenge and it can't find my table header code.

I submitted: <table style="width:300px"> <tr> <th>Firstname</th> <th>Lastname</th>
<th>Points</th> </tr> <tr> <tr> <td>Jill</td> <td>Smith</td>
<td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td>
<td>94</td> </tr> <tr> <td>John</td> <td>Doe</td>
<td>80</td> </tr> </table>

I copied and pasted from W3schools.com just to make sure I wasn't doing something wrong. Am I missing something?

Thanks, David

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

    <!-- Write your code below -->
        <table>
      <thead>
        <tr>
          <th>Any</th>
          <th>Text</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Table</td>
          <td>Body</td>
          <td>Text</td>
        </tr>
        <tr>
          <td colspan="2"></td>
        </tr>
      </tbody>
    </table>

  </body>
</html>

2 Answers

Hello,

Your problem stems from mismatching columns. In the header of the table you defined two columns; however, in the table body you have three columns defined. You have one too many columns in your body. Remove one of the columns and the challenge should pass. Hope this helps.

Cheers!

Uh the code passes

David Rajewski
David Rajewski
4,297 Points

Thanks guys! Just knocked it out, I forgot the <thead> -____- haha

The fast responses are very much appreciated!

Best, David