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 Rows and Cells

Wrong answer when adding a heading tag, can't move on.

This is the html I'm using to make a table header - but am getting a wrong answer and can't move forward. It says I need to add the heading inside the table tag - any help would be great, thanks!

<table>
  <tr>
    <th>Heading1</th>
    <th>Heading2</th>
  </tr>
</table>

3 Answers

Dennis Skoko
Dennis Skoko
12,860 Points

The table element have 2 childs, thead and tbody. Nick Pettit explains this in the video before the quiz. Like this:

<table>
  <thead>
  </thead>

  <tbody>
  </tbody>
</table>

So what they are after is that you create a thead element inside the table.

Regards, Dennis

mrx3
mrx3
8,742 Points

you need to add opening and closing thead tags to your table <thead> and </thead>

Maybe try:

<thead> <tr> <th>Month</th> <th>Savings</th> </tr> </thead>