The table displays the five countries that earned the most medals in the 2022 Winter Olympics in Beijing. Hovering the mouse over the text on the expected webpage's top row makes the text orange. Add a new rule using the tr:nth-child(even) selector that makes every even tr child element have a lavender background color. Add a new rule using the th:hover selector that changes the th element's text color to orange when the mouse hovers over the element. <table> <caption>2022 Olympic Medal Counts</caption> <tr> <th>Country</th> <th>Gold</th> <th>Silver</th> <th>Bronze</th> <th>Total</th> </tr> <tr> <td>Norway</td> <td>16</td> <td>8</td> <td>13</td> <td>37</td> </tr> <tr> <td>ROC</td> <td>6</td> <td>12</td> <td>14</td> <td>32</td> </tr> <tr> <td>Germany</td> <td>12</td> <td>10</td> <td>5</td> <td>27</td> </tr> <tr> <td>Canada</td> <td>4</td> <td>8</td> <td>14</td> <td>26</td> </tr> <tr> <td>USA</td> <td>8</td> <td>10</td> <td>7</td> <td>25</td> </tr></table>
The table displays the five countries that earned the most medals in the 2022 Winter Olympics in Beijing. Hovering the mouse over the text on the expected webpage's top row makes the text orange.
-
Add a new rule using the tr:nth-child(even) selector that makes every even tr child element have a lavender background color.
-
Add a new rule using the th:hover selector that changes the th element's text color to orange when the mouse hovers over the element.
<table>
<caption>2022 Olympic Medal Counts</caption>
<tr>
<th>Country</th>
<th>Gold</th>
<th>Silver</th>
<th>Bronze</th>
<th>Total</th>
</tr>
<tr>
<td>Norway</td>
<td>16</td>
<td>8</td>
<td>13</td>
<td>37</td>
</tr>
<tr>
<td>ROC</td>
<td>6</td>
<td>12</td>
<td>14</td>
<td>32</td>
</tr>
<tr>
<td>Germany</td>
<td>12</td>
<td>10</td>
<td>5</td>
<td>27</td>
</tr>
<tr>
<td>Canada</td>
<td>4</td>
<td>8</td>
<td>14</td>
<td>26</td>
</tr>
<tr>
<td>USA</td>
<td>8</td>
<td>10</td>
<td>7</td>
<td>25</td>
</tr>
</table>
Unlock instant AI solutions
Tap the button
to generate a solution