Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.