horizontal_rule
Pie de tabla
La etiqueta <tfoot> agrupa filas de resumen o totales en una tabla HTML
<table>
<thead>
<tr>
<th>Producto</th>
<th>Precio</th>
</tr>
</thead>
<tbody>
<tr>
<td>Laptop</td>
<td>$999</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total</td>
<td>$999</td>
</tr>
</tfoot>
</table>
<thead>
<tr>
<th>Producto</th>
<th>Precio</th>
</tr>
</thead>
<tbody>
<tr>
<td>Laptop</td>
<td>$999</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total</td>
<td>$999</td>
</tr>
</tfoot>
</table>
settings
Características principales
- calculate Ideal para totales y resúmenes
- print Se muestra al final al imprimir
- accessibility Mejora la accesibilidad para lectores de pantalla
visibility
Ejemplo visual
| Producto | Precio | Cantidad |
|---|---|---|
| Laptop | $999 | 1 |
| Monitor | $299 | 2 |
| Teclado | $79 | 1 |
| Total | $1,676 | 4 |
lightbulb
Ventaja importante
En tablas largas, el <tfoot> aparece en cada página al imprimir
compare_arrows
Posición en la estructura
- looks_one Se coloca después de <thead> y <tbody>
- looks_two En HTML, aparece antes de <tbody> en el código
- looks_3 Puede tener atributos propios (align, valign, etc.)