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

Table heading tag

I don't see that there is anything wrong with the code I have entered.

<table>
<th></th>
</table>

ERROR Bummer! Try adding a table heading tag inside of the table.


Just keep in mind that I have been building basic html pages for the last couple of months and this is how I normally do that. I believe that the system just doesn't register

<th> 

Which it should. TH still defines it as a table header.

I got it working using the THEAD tag.

1 Answer

The table heading is the

<thead></thead>

tag where as

<th></th>

represents the table row heading, it should be included within

<tr></tr> 

tags. Example of a general table markup would be,

<table>
  <thead>
    <tr>
      <th>heading column1</th>
      <th>heading column2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>content row1 column1</td>
      <td>content row2 column2</td>
    </tr>
  </tbody>
</table>

Hope this helps !