
Organizing data to be presented on the web may seem like a daunting task, but it isn’t. We can use tables to easily organize our data into columns and rows. Today, we’ll be going over the basics of how to use tables to organize data.
Tables are broken up into rows and columns. You must begin with a row, which will then contain one or more columns. In theory, you may have an unlimited number of rows and columns. Practically, there is a limit to the number of columns you can cleaning present within limited screen resolutions.
Today, we’ll be looking at three HTML tags for creating tables: table, tr and td. table obviously begins the table, wrapping around the other tags. tr begins a row and wraps around the column tag, td. Let’s have a look at an example of a simple table:
[html]<table cellspacing="3" cellpadding="3">
<tr>
<td>
Row 1, Column 1
</td>
<td>
Row 1, Column 2
</td>
</tr>
<tr>
<td>
Row 2, Column 1
</td>
<td>
Row 2, Column 2
</td>
</tr>
</table>[/html]
You’ll notice how we used cellspacing and cellpadding attributes in our table tag. These allow us to adjust the amount of spacing between each “cell”, and the amount of padding in each “cell”. Visually, our table will look like this:
| Row 1, Column 1 | Row 1, Column 2 |
| Row 2, Column 1 | Row 2, Column 2 |
While our example isn’t much to look at, you can see the potential here for easy data presentation. Next week we’ll go over some more advanced stuff on tables.


