Задание 18/18 100% прохождение. Наверное по другому никак не пройти лучше.
result https://htmlacademy.pp.ua/test18-18
codepen https://codepen.io/matviy/pen/QWwxqXZ
github
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Испытание: интерактивное расследование</title>
<link rel="stylesheet" href="challenge.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1><span>Результаты соревнования</span></h1>
<table class="results">
<tr>
<th><span>Игрок</span></th>
<th>Раунд 1</th>
<th>Раунд 2</th>
<th>Раунд 3</th>
<th>Итог</th>
</tr>
<tr class="player-1">
<td>Иван Васильев</td>
<td>10</td>
<td>-20</td>
<td>30</td>
<td class="total"><span>20</span></td>
</tr>
<tr class="player-2">
<td>Анна Иванова</td>
<td>50</td>
<td>10</td>
<td>-30</td>
<td class="total"><span>30</span></td>
</tr>
<tr class="player-3 disqualified">
<td>Василий Ольгин</td>
<td>50</td>
<td>50</td>
<td>50</td>
<td class="total"><span>150</span></td>
</tr>
<tr class="player-4">
<td>Ольга Аннова</td>
<td>-10</td>
<td>-20</td>
<td>40</td>
<td class="total"><span>10</span></td>
</tr>
</table>
<a href="https://matviy.pp.ua">Roman Matviy Front-end developer</a>
</body>
</html>
h1 {
font-size: 20px;
}
h1 + .results {
margin-top: 20px;
}
th {
font-weight: normal;
background-color: #dad7f4;
text-align: left;
}
td:nth-child(5) > span {
font-weight: bold;
}
.disqualified {
text-decoration: line-through;
}
.player-1 .total {
background-color: silver;
}
.player-2 .total {
background-color: gold;
}
.player-3 .total {
background-color: red;
}
.player-4 .total {
background-color: chocolate;
}