Table of Contents

Web Development Lesson 4 - Tables

Table Content and Structure

Objective

In this section, we'll create a table to present the statistics for the Colombian Football team. You will learn how to structure a table in rows and columns and to assign cells as headings.

Setup

Structure

Name Surname Nationality Age Position
David Ospina Ramírez Colombia 33 Portero
<table>

</table>
<table>
  <thead>
    
  </thead>
  <tbody>
    
  </tbody>
</table>
<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Surname</th>
      <th>Nationality</th>
      <th>Age</th>
      <th>Position</th>
    </tr>
  </thead>
  <tbody>
    
  </tbody>
</table>
<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>
  </tbody>
</table>
Name Surname Nationality Age Position
David Ospina Ramírez Colombia 33 Portero
Carlos Eccehomo Cuesta Figueroa Colombia 22 Defensa
Juan Guillermo Cuadrado Bello Colombia 33 Centrocampista
Radamel Falcao García Zárate Colombia 35 Delantero

Borders

td, th {
  border-width: 1px;
  border-style: solid;
}

Final Code

Next: Padding