Table basics in HTML

It’s reasonably straightforward to create a simple table when hand-coding markup. The
bare essentials of a single table is an opening <table> tag, followed by at least one table
row (a <tr>), followed by at least one table cell (a <td>, meaning “table data”). Here’s an
example:
<table>
<tr>
<td>Some data</td>
</tr>
</table>

That’s about as minimalist as you can get when it comes to creating tables, but you’re
unlikely to create a table with only one item of data, so let’s make things a touch more
interesting. The following markup is for a two-column table with four rows of data (the
presentational border attribute is just here as a visual aid to better distinguish the layout
of the table, and its effect should be replicated with CSS in a production environment):
<table border="1">
<tr>
<td>Name</td>
<td>Place of residence</td>
</tr>
<tr>
<td>Paul Haine</td>
<td>Oxford</td>
</tr>
<tr>
<td>Vikki Roberts</td>
<td>Bracknell</td>
</tr>
<tr>
<td>Leon Boardman</td>
<td>London</td>
</tr>
<tr>
<td>Emma Sax</td>
<td>Peaslake</td>
</tr>
</table>