HTML and CSS Reference
In-Depth Information
interesting. The following markup is for a two-column table with two rows of data (the
embedded style is to provide a border to act as a visual aid to better distinguish the
layout of the table; ideally, its effect should be placed in an external CSS file in a pro-
duction environment):
<style type="text/css">
td { border: 1px solid #ff0000; }
<td>Place of residence</td>
<td>Anselm Bradford</td>
<td>Paul Haine</td>
This will create a basic table, but let's take it a little further with table headers.
Adding table headers
You can make this table a bit clearer and easier to read by marking headers at the top of
the table to indicate columns. Although you can do this by adding a class name to each
table cell and then styling it with CSS, a far better way is to turn those uppermost table
cells into bona fide table headers with the th element used in place of td .
<th>Place of residence</th>
Search WWH ::

Custom Search