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

Anthony Stapor
Anthony Stapor
3,369 Points

How do you put a table heading tag inside a table?

I also tried putting the <tr> tag before the <th> tag, doesn't work either.

Any help would be appreciated.

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

    <!-- Write your code below -->
    <table>
      <th></th>





    </table>


  </body>
</html>

4 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Nope, that's not what it's looking for. You have the th tag which is a header for a cell, not the entire table. It's looking for the thead tag. Take a look:

 <table>
      <thead></thead>
 </table>
Stephen Shine
Stephen Shine
5,991 Points

I suggest that you might need to use a table row tag first, and then put your table header tag inside that.

Anthony Stapor
Anthony Stapor
3,369 Points

Already tried it, didn't work...