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

Özgür Kalan
PLUS
Özgür Kalan
Courses Plus Student 5,423 Points

Adding html table heading tag is not resulting with success in code.

What should I do? <table><tr><th></th></tr></table> this code is not accepted by the test...

Jamie Barton
Jamie Barton
14,498 Points

What code are you trying to submit?

HI Ozgur. We can't see your code. Try to markdown it. You can do in the simplest way which is by adding 3 backticks (```) in the line before and after your code. You can see more details about it in the markdown cheatsheet.

2 Answers

Jamie Barton
Jamie Barton
14,498 Points

I just tried following the challenge and it accepts the following...

I've marked each step to try and help you compare where you're going wrong.

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

    <!-- Write your code below -->

    <table> <!-- step 1 -->
  <thead> <!-- step 2 -->
    <tr> <!-- step 3 -->
      <th> <!-- step 4 -->
        Mike The Frog
      </th> <!-- step 4 -->

      <th> <!-- step 4 -->
        Treehouse Island
      </th> <!-- step 4 -->
    </tr> <!-- step 3 -->
  </thead> <!-- step 2 -->
  <tbody> <!-- step 5 -->
    <tr> <!-- step 6 -->
      <td>Hello</td> <!-- step 7 -->
      <td>Hello 2</td> <!-- step 7 -->
    </tr> <!-- step 6 -->
    <tr> <!-- step 8 -->
      <td colspan="2">
        Hello across 2 cols
      </td>
    </tr> <!-- step 8 -->
  </tbody> <!-- step 5 -->
</table> <!-- step 1 -->


  </body>
</html>

This is the BEST answer. It has every step labeled and every element covered. Put this in the BEST answer EVER.

Özgür Kalan
PLUS
Özgür Kalan
Courses Plus Student 5,423 Points

wow! I did the same mistake million times :) I have given TH instead of tHead.... thanks for help.

I just got this as well and never thought to place the <thead></thead>. I just used what is on the source code <th></th>. There has to be a difference, I think?