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 trialMiriam Allman
Courses Plus Student 1,761 Pointsadd table body cell to table body row
<!DOCTYPE html> <html> <head> <title>HTML Tables Challenge</title> </head> <body> <h1>HTML Tables Challenge</h1> <table> <thead> <tbody>
<tr> <thead>My Fruits <td>Oranges</td> <th> Yellow</th> <th>Seedless>/th> </tr> </thead> <tbody> <tr> <td>delicious</td> </table> <td>Small valencias</td> <tr> <td>these are grown in spain</td> </tr> </body> </table> </html>
What am I doing incorrectly?
<!DOCTYPE html>
<html>
<head>
<title>HTML Tables Challenge</title>
</head>
<body>
<h1>HTML Tables Challenge</h1>
<table>
<thead>
<tbody>
<tr>
<thead>My Fruits
<td>Oranges</td>
<th> Yellow</th>
<th>Seedless>/th>
</tr>
</thead>
<tbody>
<tr>
<td>delicious</td>
</table>
<td>Small valencias</td>
<tr>
<td>these are grown in spain</td>
</tr>
</body>
</table>
</html>
1 Answer
Krishna Pratap Chouhan
15,203 PointsGo through the code for step by step explanation...
<!DOCTYPE html>
<html>
<head>
<title>HTML Tables Challenge</title>
</head>
<body>
<h1>HTML Tables Challenge</h1>
<!--task 1: creating a table
<table>
</table>-->
<!--task2: creating a header for table
<table>
<thead>
</thead>
</table>
-->
<!--task3; creating a row
<table>
<thead>
<tr>
</tr>
</thead>
</table>
-->
<!-- task4: creating a header cell(th)
<table>
<thead>
<tr>
<th></th>
</tr>
</thead>
</table>
-->
<!--task5: create a body for table(its like html structure: html>head>closeHead>body>closeBody>closeHtml.
<table>
<thead>
<tr>
<th>Some text</th>
<th>Some other text</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
-->
<!-- task6: adding a row in body of table
<table>
<thead>
<tr>
<th>Some text</th>
<th>Some other text</th>
</tr>
</thead>
<tbody>
<tr>
</tr>
</tbody>
</table>
-->
<!-- task6: adding cells(td)
<table>
<thead>
<tr>
<th>Some text</th>
<th>Some other text</th>
</tr>
</thead>
<tbody>
<tr>
<td>Adding cells<td>
</tr>
</tbody>
</table>
-->
<table>
<thead>
<tr>
<th>Some text</th>
<th>Some other text</th>
</tr>
</thead>
<tbody>
<tr>
<td>Adding cells<td>
</tr>
<tr>
<td colspan=2>Adding Spanned cell<td>
</tr>
</tbody>
</table>
</body>
</html>
Please do mention if there is further problem