[HTML][JavaScript][Computer Stuff][Freeing the Mind]

Ken Ward's HTML Tutorial ...

Aligning table cell contents!

The following table illustrates the code for aligning the contents of each cell, either vertically using valign or horizontally using align.

Of course, you can combine the two so that you get the effect you want.

<td valign="baseline"> Here, the left hand bit is aligned to the baseline.
<td valign="bottom"> Here, the left hand bit is aligned to the bottom.
<td valign="middle"> Here, the left hand bit is aligned to the middle.
<td valign="top"> Here, the left hand bit is aligned to the top.
<td align="left"> Here, the left hand bit is aligned to the left.
<td align="right"> Here, the right hand bit is aligned to the right.
<td align="center"> Here, the left hand bit is aligned to the centre.

The table itself is aligned using the <center></center> tag surrounding the whole table.

Hey! Have you noticed that the text looks a bit cramped in the table?

Let's fix it up with a bit of padding!


[back to: table properties]
[home][contents]
[on to:  padding ]


Most Recent Revision: 18-Oct-98.
Copyright � 1998

I am always pleased to hear from you.
Send your comments to
and please visit: New Life Course