Table of Contents

Lección 3 de Desarrollo Web - Tablas

Tablas

Objetivo

En esta sección, crearemos una tabla para presentar las estadísticas de la selección colombiana de fútbol. Aprenderá a estructurar una tabla en filas y columnas y a asignar celdas como encabezados/titulos.

Preparacion

Structure

Nombre Apellido Nationalidad Edad Posición
David Ospina Ramírez Colombia 33 Portero
<table>

</table>
<table>
  <thead>
    
  </thead>
  <tbody>
    
  </tbody>
</table>

Celdas con Titulos

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Surname</th>
      <th>Nationality</th>
      <th>Age</th>
      <th>Position</th>
    </tr>
  </thead>
  <tbody>
    
  </tbody>
</table>

Celdas con Datos

<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>
Nombre Apellido Nacionalidad La Edad Posición
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

Bordes

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

Siguiente: Relleno y Visualización