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

this is right what is this think talking about

why is thing so glitch all my code is right I know it is I have checked it or the questions asked are completely different to how the context is explained needs refining badly

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

    <!-- Write your code below -->
<table border="1" cellpadding="2" cellspacing="2"> 
 <!-- cellpadding increases the border thickness around all cells -->
 <!-- cellspacing increases space between cells each number representing one pixel -->
 <!-- <table>  </table> creates a table, border= sets the border line width -->
  <thead> <!-- table header command -->

<tr>  <!-- Table row Command -->
<th> Music</th> <th>Genres</th>  <!-- Table row header -->
<th valign="top">Artists</th>  <!-- valign aligns text vertically to top middle or bottom of the row -->

</tr>
    <tr>
      <th>

      <td> DANIEL </td>

      </th>
    </tr>

</thead>
<tfoot>  <!-- Table footer command -->
<tr>
<td colspan="2" align="center"> This Is my footer</td> <!-- colspan is colum span makes data span across colums, align command aligns text -->
</tr>
</tfoot>

<tr>
<td>Hip hop</td>  <!-- <td> </td> table data -->
<td>Snowgoons</td>
</tr>


<tr>
  <td>Dubstep</td>
  <td>Crispy</td>
  </tr>

 <tr>
 <td>Drum And Bass</td>
<td>ltj bukem</td>
 </tr>
 <tr>
 <td></td>   <!-- leave an empty table data cell to move data over to the next row -->
 <td>Weazel</td>

 </tr>  


    </table>



  </body>
</html>

3 Answers

This is passing code for the challenge:

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

    <!-- Write your code below -->
    <table>
      <thead>
        <tr><th>Column 1</th><th>Column 2</th></tr>
      </thead>
      <tbody>
        <tr>
          <td>This is some text.</td>
          <td>This is even more text.</td>
        </tr>
        <tr>
          <td colspan=2>This is a long cell<td>
        </tr>
      </tbody>
    </table>

  </body>
</html>

When I look at your code, I see a bunch of stuff that they did not ask for in the challenge. Their program is looking for specific stuff to pass the challenge. If you add extra, you often fail even if your underlying code is correct. When I reexamine your code, you put stuff in areas not directed to by the challenge. That will also make you fail even if the html is correctly coded. For example, you put the colspan in a tfoot tag which is not requested in the challenge. They you put more stuff after the tfoot, which contrary to the idea of a footer.

In essence, you need to follow the directions precisely or you will be very frustrated with the challenges.

its all good yeah I did it just as simple as possible it was one thing that I had missed that wasn't explained in the video I think it was about the table head I wasn't sure of the difference between the <th> and the <thead> wasn't sure which one it was asking for from the question but it gave me an easier description when I did it simply and also the use of the <tbody> input wasn't mentioned in the video but it asked for it in the challenge. another question I have is in a separate piece I made I added a <tbody> and the text I used in the <tbody> was above some text and rows I had put into the <thead> command is that normal?

I am not sure what you are asking about being normal. I am also not sure how the instructions led to the code you posted. If you look at the instructions carefully, they usually give you the commands you need to use. It is also usually top to bottom. When it isn't it is usually clear from the instructions.