Have decided to create a table of the Football team i support which contains sections that has Dates played, Teams played throughout the season, a link to the match played, and finally the date of their next match. But when i tried to put the names of the players who scored beneath the teams that played i had to use "rowspan" and even though i have had the page validated at W3C Markup Validation Service i was warned that: A table row was 5 columns wide and exceeded the column count established by the first row (4). My tired old eyes can't see where to resolve this warning?
Here is the code i used:
Would someone please check my use of "rowspan" to see if it it correct?
Very big thanks everyone
Here is the code i used:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML Rowspan</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
#container {
width: 80%;
margin: 100px auto;
border: 2px solid blue;
border-radius: 20px;
}
.table {
width: 80%;
margin: 0 auto;
padding: 20px;
}
date {
width: 200px;
}
teams {
width: 400px;
}
match report {
width: 150px;
text-align: center;
}
next game {
width: 200px;
text-align: center;
}
caption {
font-size:36px;
text-decoration: underline;
padding-top: 20px;
}
th {
text-decoration: underline;
}
td {
border: 1px solid #004400;
text-align: center;
}
</style>
</head>
<body>
<div id="container">
<table class="table">
<caption>Using Rowspan in an HTML Table?</caption>
<tr>
<th>Date</th>
<th>Teams</th>
<th>Report</th>
<th>Next Game</th>
</tr>
<tr>
<td rowspan="2">Some day in 2024</td>
<td rowspan="2">team one 2 - 1 team two<br>
<span style="font-size: 14px;">player one(74') player two(90'+2 pen)</span></td>
<td rowspan="2"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td rowspan="2">Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> Month 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> October 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> October 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> October 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> October 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> October 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
<tr>
<td>Some day soon<sup>th</sup> October 2024</td>
<td>Team one 2 - 1 Team two</td>
<td style="text-align: center"><a href="https://www.bbc.co.uk/sport/football/live/vctj7pyyhc" target="_blank">Report</a></td>
<td>Some day soon<sup>th</sup> Month 2024</td>
</tr>
</table>
</div>
</body>
</html>
Would someone please check my use of "rowspan" to see if it it correct?
Very big thanks everyone
Last edited: