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

I do not see what is the problem with my code!

I do not see what is the problem with my code!

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

    <!-- Write your code below -->

    <table border = "5" cellpadding="5" cellspacing="10">

        <thead>
            <tr>
                <td align="center">Name</td>
                <td align="left">Adress</td>
            </tr>
        </thead>
        <tbody> 
        <tr>
            <td>Jill</td>
            <td>Route 55</td>
        </tr>
        <tbody>
    </table>
  </body>
</html>

4 Answers

Steven Parker
Steven Parker
231,269 Points

:white_check_mark: Your spacing is fine. Spaces between attributes and values is ignored (but it is good practice to leave them off).

:point_right: The challenge asks you to "Put two header cells...", the keyword here is header. Besides being located inside the header area, a header cell would be tagged TH instead of TD, like this:

    <table border = "5" cellpadding="5" cellspacing="10">
        <thead>
            <tr>
                <th align="center">Name</th>  <!-- these are "header cells" -->
                <th align="left">Adress</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Jill</td>
                <td>Route 55</td>
            </tr>
        <tbody>
    </table>
Jeff Lemay
Jeff Lemay
14,268 Points

Right off the bat I can see that your border attribute on the table element is not set up properly (cannot have spaces on the sides of the equal sign).

border = "5" should be border="5"

Hi Jeff,

thanks for your reply.

My question was incomplete. The chaledge ask me to: "Put two header cells with any text inside of the row you just created". Can not see the bug!

it is specifically looking for th tags. you used td tags

huckleberry
huckleberry
14,636 Points

"Hi Jeff,

thanks for your reply.

My question was incomplete. The challenge ask me to: "Put two header cells with any text inside of the row you just created". Can not see the bug!"

The problem is that it asked you for table header cells and you used normal table row cells. Don't forget that table header cells have their own tags. You have thead which designates that "this here contains stuff that is the header" but inside of the thead, you still have to use table header tags, not table row tags, which is what you did.

Now you got it figured out? ;)

Cheers,

Huck - :sunglasses:

edit: why do I bother? lol... smh