HTML Tables Tutorial

Page 18 - <td> valign


To place content in a cell along the vertical axis you use the attribute valign. There are three possible values for this attribute: top, middle, and bottom. Middle is the default.


<table border="1" width="300">
   <tr>
      <td>Cell #1</td>
      <td>Cell #2</td>
   </tr>
   <tr>
      <td height="100">
 Cell #3<td>
      <td>Cell #4</td>
   </tr>
</table>

=
Cell #1 Cell #2
Cell #3 Cell #4

<table border="1" width="300">
   <tr>
      <td>Cell #1</td>
      <td>Cell #2</td>
   </tr>
   <tr>
      <td height="100">
 Cell #3<td>
      <td valign="bottom">Cell #4</td>
   </tr>
</table>

=
Cell #1 Cell #2
Cell #3
Cell #4
 
 
MPF.com Site Map