When using :nth-child(1)
on a table, Why does the style not only apply to the first cell?
<!DOCTYPE html>
<html>
<head>
<style>
.header:nth-child(1) {
background: lightgreen;
}
</style>
</head>
<body>
<table>
<tr class="header">
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
</body>
</html>