Tell us what’s happening:
Test case #39 is not recognizing the scope=“row” attribute that I have added to the table header cells per row as instructed. I’ve already tried running my code on any HTML validator just in case there are coding typos. Is this a bug or is there something I am not doing wrong?
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Availability Table</title>
<link rel="stylesheet" href="styles.css"/>
</head>
<body>
<table>
<caption>Weekly Meeting Availability Schedule</caption>
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Monday</th>
<th scope="col">Tuesday</th>
<th scope="col">Wednesday</th>
<th scope="col">Thursday</th>
<th scope="col">Friday</th>
<th scope="col">Saturday</th>
<th scope="col">Sunday</th>
</tr>
</thead>
<tbody>
<tr class="half">
<th scope="row" class="time">9AM</th>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-3"></td>
<td aria-label=" available" class="available-2"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-3"></td>
</tr>
<tr class="sharp">
<th scope="row" class="time">10AM</th>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-2"></td>
<td aria-label=" available" class="available-1"></td>
<td aria-label=" available" class="available-1"></td>
<td aria-label=" available" class="available-2"></td>
<td aria-label=" available" class="available-0"></td>
</tr>
<tr class="half">
<th scope="row" class="time">11AM</th>
<td aria-label=" available" class="available-1"></td>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-4"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-1"></td>
</tr>
<tr class="sharp">
<th scope="row" class="time">12PM</th>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-4"></td>
<td aria-label=" available" class="available-1"></td>
<td aria-label=" available" class="available-3"></td>
<td aria-label=" available" class="available-1"></td>
</tr>
<tr class="half">
<th scope="row" class="time">1PM</th>
<td aria-label=" available" class="available-1"></td>
<td aria-label=" available" class="available-5"></td>
<td aria-label=" available" class="available-4"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-4"></td>
<td aria-label=" available" class="available-0"></td>
<td aria-label=" available" class="available-2"></td>
</tr>
</tbody>
</table>
<div id="legend">
<span>Availability </span>
<div id="legend-gradient"></div>
</div>
</body>
</html>
/* file: styles.css */
:root {
--color0: #ffffff;
--color1: #F0FFF0;
--color2: #98FB98;
--color3: #32CD32;
--color4: #228B22;
--color5: #003300;
--solid-border: 1px solid black;
--dashed-border:1px dashed black;
}
* {
/* border: 1px solid black; */
}
.available-0 {
background-color: var(--color0);
}
.available-1 {
background-color: var(--color1);
}
.available-2 {
background-color: var(--color2);
}
.available-3 {
background-color: var(--color3);
}
.available-4 {
background-color: var(--color4);
}
.available-5 {
background-color: var(--color5);
}
.sharp td {
border-bottom: var(--solid-border);
}
.half td {
border-bottom: var(--dashed-border);
}
table {
table-layout: fixed;
width: 100%;
margin: 0 auto;
}
table tr td {
height: 1em;
border: 1px solid black;
border-collapse: collapse;
}
#legend {
width: 25%;
margin: 1em auto;
}
#legend span {
display: inline-block;
width: 100%;
text-align: center;
}
#legend-gradient {
width: 50%;
height: 1.25em;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid black;
background-image: linear-gradient(to right, var(--color0) 0%, var(--color0) 16%, var(--color1) 16%, var(--color1) 33%, var(--color2) 33%, var(--color2) 49%, var(--color3) 49%, var(--color3) 65%, var(--color4) 65%, var(--color4) 81%, var(--color5) 81%, var(--color5) 100%);
margin: .5em auto 0;
}
#legend-gradient::before {
content: "0";
position: absolute;
left: -1.75em;
}
#legend-gradient::after {
content: "5+";
position: absolute;
right: -2.25em;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Challenge Information:
Build an Availability Table - Build an Availability Table