Aligning table and its contents

Aligning the table

The syntax for specifying the table alignment is:

<table align="alignment">

where the parameter alignment takes on values "left", "center", or "right".

align="left"
Col 1Col 2 Col 3
cell 1 cell 2 cell 3
cell 4 cell 5 cell 6
align="center"
Col 1Col 2 Col 3
cell 1 cell 2 cell 3
cell 4 cell 5 cell 6
align="right"
Col 1Col 2 Col 3
cell 1 cell 2 cell 3
cell 4 cell 5 cell 6




Horizontal cell alignment

The syntax for specifying the horizontal alignment alignment of a cell text is:

<td align="alignment">

where the parameter alignment takes values "left", "center", or "right".

align="left" align="center" align="right"
left center right




Vertical cell alignment

The syntax for specifying the vertical alignment alignment of a cell text is:

<td valign="alignment">

where the parameter alignment takes values "top", "middle", or "bottom".

valign="top" valign="middle" valign="bottom" 
top middle bottom a
high
high
high
high
cell