Cómo hacer un catálogo de productos simple en HTML con tablas

Las tablas HTML son la forma más sencilla de maquetar un catálogo: imagen, descripción, stock/precio en columnas.

Ejemplo completo, válido y accesible

<table border="1" cellpadding="10" cellspacing="0" style="border-collapse:collapse; width:100%; max-width:800px; margin:1rem auto; font-family:sans-serif;">
  <thead>
    <tr style="background:#f0f0f0;">
      <th scope="col" style="width:80px;">Imagen</th>
      <th scope="col">Descripción</th>
      <th scope="col" style="width:180px;">Disponibilidad / Precio</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align:center;"><img src="producto1.jpg" alt="Producto 1" width="60" height="60" style="max-width:100%; height:auto;"></td>
      <td>Zapatillas running ligeras, malla transpirable, suela reactiva.</td>
      <td><strong>En stock - $89.99</td>
    </tr>
    <tr>
      <td style="text-align:center;"><img src="producto2.jpg" alt="Producto 2" width="60" height="60" style="max-width:100%; height:auto;"></td>
      <td>Mochila urbana 25L, compartimento portátil 15", resistente agua.</td>
      <td><strong>Pedido pendiente - $129.00</td>
    </tr>
  </tbody>
</table>

Buenas prácticas

  • Usa <thead>, <tbody>, <th scope="col"> para accesibilidad.
  • cellpadding="10" (o CSS padding:10px en td,th) = espacio interno.
  • border-collapse:collapse evita bordes dobles.
  • Responsive: En móvil, apila celdas con CSS: @media (max-width:600px){ table, thead, tbody, th, td, tr {display:block;} th{position:absolute; top:-9999px;} tr{border:1px solid #ccc; margin-bottom:1rem;} td{border:none; padding:0.5rem;} td::before{content:attr(data-label); font-weight:bold;} } y añade data-label="Imagen", data-label="Descripción", data-label="Precio" a cada <td>.
Para catálogos reales: usa CSS Grid/Flexbox + tarjetas (cards) —más moderno, responsive nativo, accesible—. Tablas solo para datos tabulares puros.