+ 1

Help with table please

So I'm practicing doing tables, and the table header seems to be out of place. Here's the link to the code: https://code.sololearn.com/WHXzvPUB48NY/?ref=app Any help would be appreciated! 😉

26th Mar 2020, 6:11 PM
Rayquan Rogers
Rayquan Rogers - avatar
5 Réponses
+ 1
This is how you give table headers- <tr> <th>Fruit</th> <th>Vegetable</th> </tr>
26th Mar 2020, 6:20 PM
Avinesh
Avinesh - avatar
+ 2
Line 9 - replace <th> by <tr>
26th Mar 2020, 6:13 PM
Avinesh
Avinesh - avatar
+ 1
Your code solution Please copy and paste in your code <!DOCTYPE html> <html> <head> <title>Tables</title> </head> <body> <table border=1> <tr> <th colspan="2">Top 5 fav</th> </tr> <tr> <th>Fruit</th> <th>Vegetable</th> </tr> <tr> <td>Apples</td> <td>Tomatoes</td> </tr> <tr> <td>Bananas</td> <td>Broccoli</td> </tr> <tr> <td>Oranges</td> <td>Carrots</td> </tr> <tr> <td>Peaches</td> <td>Onions</td> </tr> <tr> <td>Strawberries</td> <td>Pickles</td> </tr> </table> </body> </html>
27th Mar 2020, 3:59 AM
SAN
SAN - avatar
0
Do you meant put tr instead of th for the table header?
26th Mar 2020, 6:17 PM
Rayquan Rogers
Rayquan Rogers - avatar
0
Thanks, I totally missed that! 😅 Still gotta look over a few basics again.
26th Mar 2020, 6:25 PM
Rayquan Rogers
Rayquan Rogers - avatar