Подсказки:
- Стили для
body
менять не надо. - Используемые цвета:
darkcyan
,lightblue
,lightyellow
,lightgray
,black
,white
. - Ширина ячеек:
33%
. - Размеры отступов кратны
5
. - Цвет текста задаётся с помощью CSS-свойства
color
. - Тег
caption
использовать не нужно.
Выполнение: 89%.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Испытание: итоговая таблица</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Итоговая таблица</h1>
<table>
<tr class="four">
<th class:"one">Город</th>
<th class:"two six">Посещений</th>
<th class:"three">%</th>
</tr>
<tr>
<td class:"one">СПб</td>
<td class:"two">199</td>
<td class:"three">65.12</td>
</tr>
<tr class:"five">
<td class:"one">Москва</td>
<td class:"two">69</td>
<td class:"three">21.3</td>
</tr>
<tr>
<td class:"one">Киев</td>
<td class:"two">5</td>
<td class:"three">8</td>
</tr>
<tr class:"five">
<td class:"one" colspan="2">Посещений за весь период</td>
<td class:"three">273</td>
</tr>
</table>
</body>
</html>
body {
width: 350px;
margin: 0;
padding: 0 10px;
font-size: 14px;
font-family: "Arial", sans-serif;
}
th,
td {
padding: 10px;
}
td {
border-bottom: 1px solid lightgray;
}
th {
width: 33%;
border-bottom: 1px solid black;
border-top: 1px solid black;
}
table {
border-collapse: collapse;
}
.one {
text-align: left;
}
.two {
text-align: center;
}
.three {
text-align: right;
}
.four {
background-color: darkcyan;
color: white;
}
.five {
background-color: lightyellow;
}
.six {
background-color: lightblue;
}