In this activity we'll adjust the spacing between cells and within cells to make it more readable.
HTML
<table>
<thead>
<tr>
<th>Name</th>
<th>Surname</th>
<th>Nationality</th>
<th>Age</th>
<th>Position</th>
</tr>
</thead>
<tbody>
<tr>
<td>David</td>
<td>Ospina Ramírez</td>
<td>Colombia</td>
<td>33</td>
<td>Portero</td>
</tr>
<tr>
<td>Carlos</td>
<td>Eccehomo Cuesta Figueroa</td>
<td>Colombia</td>
<td>22</td>
<td>Defensa</td>
</tr>
<tr>
<td>Juan Guillermo</td>
<td>Cuadrado Bello</td>
<td>Colombia</td>
<td>33</td>
<td>Centrocampista</td>
</tr>
<tr>
<td>Radamel Falcao</td>
<td>García Zárate</td>
<td>Colombia</td>
<td>35</td>
<td>Delantero</td>
</tr>
</tbody>
</table>
CSS
td, th {
border-width: 1px;
border-style: solid;
}
td {
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-bottom: 10px;
}
border-collapse property to the <table> element.table {
border-collapse: collapse;
}
<td> in your 'Inspector' pane to view those styles.color: green; and see that all the data cells of your table become green, as do some of the borders.margin: 10px; to your 'td' element style.margin is not a valid property for table cells.color: green; and you'll see the rule is struck out and has a warning sign next to it. You will quickly find any typing errors if you scan your CSS rules here and changes you make here won't change your original code.