A brief introduction to HTML
|
Organising content [2] Tables
- Tables are the most abused things in HTML. They are
intended for laying out tabular data, not forcing your pages
into shape!
-
The formal definition of the
table tag is quite complex, but briefly:
- The
table tag contains
tr (table row) tags
- The tr tags contain a number of either
th (table header) or
td (table data) tags, and nothing else.
- The th and td tags can
contain anything (more or less)
- Obviously, you need one 'cell' (either
th or td) in each row for each
column you want in the table.
- If you want to make one cell span more than one row
or more than one column, you can use the
rowspan and
colspan attributes.