+ 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! 😉
5 Réponses
+ 1
This is how you give table headers-
<tr>
<th>Fruit</th>
<th>Vegetable</th>
</tr>
+ 2
Line 9 - replace <th> by <tr>
+ 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>
0
Do you meant put tr instead of th for the table header?
0
Thanks, I totally missed that! 😅 Still gotta look over a few basics again.