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

How do i Put two header cells with any text inside of the row I just created?

Hey in the project I need to put two header cells but Im having trouble doing this, can someone help me please?

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

    <!-- Write your code below -->
<table border="2">
  <thead>
  <tr>
    <th>Sport</th>
    <td>Soccer</td>
    <td>Baseball</td>
    <td>Basketball</td>
  </tr>
    <thead>
  <tr>
    <th>Number of people in the team</th>
    <td>11</td>
    <td>9</td>
    <td>5</td>
  </tr>

  </body>
</html>

1 Answer

Rhys Kearns
Rhys Kearns
4,976 Points

You forgot the </thead>, you only did <thead> and forgot to close it :)

Rhys Kearns Oh tank you but still. even when I put the closing tag it says: Header cells must be inside of a table row and have text in them.