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!

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 with text in the cells?

I'm not sure what I'm doing wrong. Here is my code:

<table border="1">
<tr>
<thead>
        <th>Table Head</th>
        <th>Table Head2</th>
</thead>
</tr>
<tr>
        <td>Table Data</td>
        <td>Table Data2</td>
</tr>
</table>

7 Answers

Hey Walter,

Took a look and I think the task requires you to add the tbody tag to the body of your table. your code should look something like this:

<table>
  <thead>
    <tr>
      <th>content</th>
      <th>content</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>things</td>
      <td>things</td>
    </tr>
  </tbody>
    </table>
Greg Barbosa
Greg Barbosa
9,874 Points

What problem are you having? Using your code everything seems alright to me. http://codepen.io/anon/pen/tufga

<table border="1"> 
  <tr> 
    <thead> 
      <th>Table Head</th> 
      <th>Table Head2</th> 
    </thead> 
  </tr> 
  <tr> 
    <td>Table Data</td> 
    <td>Table Data2</td> 
  </tr> 
</table>

Hey Walter,

That code should run fine. Is it not passing on a treehouse quiz?

Greg Barbosa
Greg Barbosa
9,874 Points

I'm assuming you are working on this code challenge, Walter. Which part are you specifically stuck on?

Hey, Alexander, I thought it was correct. I even checked it out on an html file on my computer and the table came out great. Hey, Greg, that's the challenge task 7 out of 8.

I just tried the code you put in codepen. It didn't work. What to do?

Alexander that worked like a charm! Thank you both for your help.

Alexander that worked like a charm! Thank you both for your help.