Using a table is one of the best ways to present the data.
We can use the <table>
element to create a table.
<tr>
tag.<td>
tag.<th>
element.A border can be added using the border attribute:
<table border="3">
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
A border can be added using the border attribute:
<table border="3">
<table>
<tr>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
</tr>
<tr>
<td colspan="2">Out of Town</td>
<td>Back in Town</td>
</tr>
</table>
Tables can be split into three main sections: a head, a body, and a footer.
<thead>
element.<tbody>
element.<tfoot>
element.<table>
<thead>
<tr>
<th>Quarter</th>
<th>Revenue</th>
<th>Costs</th>
</tr>
</thead>
<tbody>
<tr>
<th>Q1</th>
<td>$12M</td>
<td>$10M</td>
</tr>
<tr>
<th>Q2</th>
<td>$16M</td>
<td>$2M</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Total</th>
<td>$32M</td>
<td>$12M</td>
</tr>
</tfoot>
</table>