It looks like you're almost there! The autograder expects you to define your styles using CSS classes in the <style> tag, rather than using inline styles directly on your <tr> elements. Also, it seems to consider the header row as separate, so the first data row should be counted as odd.
Here's what you need to do:
-
Move all your inline styles into the <style> tag in the <head>.
Define your classes like this:
<style>
.header {
background-color: OliveDrab;
color: white;
text-align: center;
}
.odd-row {
background-color: SandyBrown;
}
.even-row {
background-color: LightCoral;
}
</style>
-
Update your class assignments on the <tr> elements to match the row numbering expected by the autograder.
The autograder considers the first data row as odd. So, adjust your rows like this:
<tr class="header">
<!-- header content -->
</tr>
<tr class="odd-row">
<!-- first data row -->
</tr>
<tr class="even-row">
<!-- second data row -->
</tr>
<tr class="odd-row">
<!-- third data row -->
</tr>
<tr class="even-row">
<!-- fourth data row -->
</tr>
-
Remove all style attributes from your <tr> elements.
Since you've defined the styles in the <style> tag, you don't need inline styles anymore.
Here's how your corrected code might look:
<!DOCTYPE html>
<html>
<head>
<title>National Sport</title>
<style>
.header {
background-color: OliveDrab;
color: white;
text-align: center;
}
.odd-row {
background-color: SandyBrown;
}
.even-row {
background-color: LightCoral;
}
</style>
</head>
<body>
<h1>My Daily Favorites</h1>
<table border="1" style="width: 100%; font-family: Helvetica; border-collapse: collapse;">
<tr class="header">
<th>Sunday</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
</tr>
<tr class="odd-row">
<td>Cheese</td>
<td>Cereal</td>
<td>Bread</td>
<td>Pumpkin seeds</td>
<td>Yogurt</td>
<td>Cottage cheese</td>
<td>Beef Jerky</td>
</tr>
<tr class="even-row">
<td>Binge tv</td>
<td>Soccer</td>
<td>Video Games</td>
<td>Coding</td>
<td>Youtube</td>
<td>Helping around house</td>
<td>Playing with cat</td>
</tr>
<tr class="odd-row">
<td>Dave</td>
<td>Chris</td>
<td>Phoenix</td>
<td>Eva</td>
<td>Will</td>
<td>Patrick</td>
<td>Seth</td>
</tr>
<tr class="even-row">
<td>Home</td>
<td>Arcade</td>
<td>Park</td>
<td>Seth's house</td>
<td>H.E.B</td>
<td>School</td>
<td>Grandma's</td>
</tr>
</table>
</body>
</html>
By making these changes, you should pass all the autograder tests. Good luck!