<center><img src="/graphics/JSBUG.jpg"></center> Table dictionary
Attribute: align

Table Alignment


Using the align attirbute inside a table, will give you
better control over how the data is presented in your table.

You can use:

align=center
align=right
align=left (default)
valign=top
valign=bottom



Lets use a table with 2 rows, 3 cells in each.

<table cellpadding=0 cellspacing=0 border=1>
<tr>
<td width=150 height=100>Cell 1</td>
<td width=150 height=100>Cell 2</td>
<td width=150 height=100>Cell 3</td>
</tr>
<tr>
<td width=150 height=100>Cell 4</td>
<td width=150 height=100>Cell 5</td>
<td width=150 height=100>Cell 6</td>
</tr></table>

Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

Notice that since I am using no align attribute, the items
in each cell align to the left, by default.

To change how the items line up in the cells, we can add a tag
to each table row, like this: (added part is in red)

<table cellpadding=0 cellspacing=0 border=1>
<tr ALIGN=CENTER>
<td width=150 height=100>Cell 1</td>
<td width=150 height=100>Cell 2</td>
<td width=150 height=100>Cell 3</td>
</tr>
<tr ALIGN=RIGHT>
<td width=150 height=100>Cell 4</td>
<td width=150 height=100>Cell 5</td>
<td width=150 height=100>Cell 6</td>
</tr>
</table>

which will look like this:

Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

You can alternately use any of the ones listed at the top of
this page.

Using the align attribute in a table row tag, will align every
table data cell in that row. You can also choose to just align
a certain data cell inside a row, instead of the whole row.
To do that, you would add the attribute to that specific table data
cell, rather than the table row, like this:
(notice also, you can combine 2 attributes in one cell)

<table cellpadding=0 cellspacing=0 border=1>
<tr>
<td ALIGN=CENTER width=150 height=100>cell 1</td>
<td VALIGN=TOP width=150 height=100>cell 2</td>
<td VALIGN=BOTTOM width=150 height=100>cell 3</td>
</tr>
<tr>
<td ALIGN=RIGHT width=150 height=100>cell 4</td>
<td VALIGN=TOP ALIGN=RIGHT width=150 height=100> cell 5</td>
<td VALIGN=BOTTOM ALIGN=CENTER width=150 height=100> cell 6</td>
</tr>
</table>
to produce this:

cell 1 cell 2 cell 3
cell 4 cell 5 cell 6


http://sammikay.com