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 Clawson
David Clawson
6,767 Points

Not sure what's up. Tried many ways to show header element. :-\

Stuck on step two. The preview clearly shows a table with a header, but can't pass for some reason. I tried reloading, making the table more or less complicated, restating the challenge and doing a single element table and then converting the element to a header, also tried doing that but adding the header on top of the regular element.

html: ''' <table> <tr> <th>Header</th> </tr> <tr> <td>Element</td> </tr> </table> '''

2 Answers

Jacob Miller
Jacob Miller
12,466 Points

Add an opening and closing <thead> between the <table> tags.

David Clawson
David Clawson
6,767 Points

Isn't it supposed to look like this? I thought "<th>" was the right way to do a table header? Thanks for your help.

   <table>
      <tr>
        <th> Heading 1 </th>
        <th> Heading 2 </th>
        <th> Heading 3 </th>
        </tr>
      <tr>
        <td>Element 1</td>
        <td>Element 1</td>
        <td>Element 1</td>
      </tr>
   </table>