Tables

In the past, tables were often used to control page layout, but this should now be done with CSS. Tables should only be used for displaying tabular data.

Tables <table> contain one or more rows <tr>.

Each row contains one or more cells – table data <td> or table heading <th> tags.

Cells can contain text or other HTML elements.

Keep tables manageable by good use of indentation.

<table>
    <tr>
        <th>School</th>
        <th>Location</th>
    </tr><tr>
        <td>Anderson High School</td>
        <td>Lerwick</td>
    </tr><tr>
        <td>Baltasound High School</td>
        <td>Unst</td>
    </tr>
</table>