Specifies an element that arranges its contents into rows and columns.
The table element was commonly used by authors as a layout device, however this is now frowned upon.
<table cellpadding="4px" cellspacing="2px" border="2px" bordercolor="black">
<caption style="background-color:#DDDDDD;">Fruits</caption>
<thead>
<tr>
<th>name</th>
<th>price</th>
</tr>
</thead>
<tbody>
<tr>
<td>apple</td>
<td>3.35$</td>
</tr>
<tr>
<td>peach</td>
<td>2.21$</td>
</tr>
</tbody>
<tfoot>
<tr style="font-weight:bold;">
<td>Sum</td>
<td>5.56$</td>
</tr>
</tfoot>
</table>
name | price |
---|---|
apple | 3.35$ |
peach | 2.21$ |
Sum | 5.56$ |