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 trialAllan Alivio
2,695 PointsAdd cells with text to your table body. Stuck on the coding
Im stuck on HTML tables quiz Question 7 "Add cells with text to your table body.". Am I missing something? Did i miss a bracket or something?
<!DOCTYPE html>
<html>
<head>
<title>HTML Tables Challenge</title>
</head>
<body>
<h1>HTML Tables Challenge</h1>
<!-- Write your code below -->
<table>
<tr>
<thead>
<tr>
<th>table data 1</th>
<th>table data 2</th>
</tr>
</thead>
</tr>
<tbody>
<tr>
<td>text 1 </td>
<td>text 2</td>
</tr>
</tbody>
</table>
</body>
</html>
2 Answers
Andrew Gale
4,475 PointsMaybe this is messing you up (on your code): - Try to take out the opening TR on your code under table and it should work. (The full code at the bottom is mine and working)
</thead>
</tr>
<tbody>
<!DOCTYPE html>
<html>
<head>
<title>HTML Tables Challenge</title>
</head>
<body>
<h1>HTML Tables Challenge</h1>
<!-- Write your code below -->
<table>
<thead>
<tr>
<th>text</th>
<th>text</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>text</td>
</tr>
</tbody>
</table>
</body>
</html>
James Barnett
39,199 PointsAllan Alivio - As Andrew Gale alluded table rows (<tr>
) when using <thead>
any <tr>
s must be inside of it.
Allan Alivio
2,695 PointsAllan Alivio
2,695 PointsAwesome thanks so much