<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Испытание: итоговая таблица</title>
</head>
<body>
<h1>Итоговая таблица</h1>
<table>
<tr>
<th class="left">Город</th>
<th class="blue"> Посещений</th>
<th class="right">%</th>
</tr>
<tr>
<td>СПб</td>
<td class="center">199</td>
<td class="right">65.12</td>
</tr>
<tr class="pink">
<td>Москва</td>
<td class="center">69</td>
<td class="right">21.3</td>
</tr>
<tr>
<td>Киев</td>
<td class="center">5</td>
<td class="right">8</td>
</tr>
<tr class="pink">
<td colspan="2">Посещений за весь период</td>
<td class="right">273</td>
</tr>
</table>
</body>
</html>
css
body {
width: 350px;
margin: 0;
padding: 0 10px;
font-size: 14px;
font-family: Arial, sans-serif;
}
.pink {
background-color: lightyellow;
}
th{
background-color: darkcyan;
color: white;
border-top: 1px solid black;
border-bottom: 1px solid black;
height: 35px;
}
table{
border-collapse: collapse;
width: 100%;
}
td{
padding: 10px;
width: 33%;
border-bottom: 1px solid lightgray;
}
.right {
text-align: right;
padding-right: 10px;
}
.center {
text-align:center;
}
.left {
text-align:left;
padding-left: 10px;
}
.blue {
background-color: lightblue;
}