HTML Tables Tutorial

Page 23 - <tr> valign


If you want every cell in a row to be vertically aligned to the top then you can specify this in the <tr> tag. This reduces some typing by not having to do so in every <td> tag. You can override the row's vertical alignment of a cell by placing the align attribute in the <td>.


<table border="1" width="200" >
   <trv align="top">
      <td height="100" >Cell #1</td>
      <td height="100">Cell #2</td>
      <td height="100">Cell #3</td>
   </tr>
   <tr valign="top">
      <td height="100">Cell #4</td>
      <td height="100">Cell #5</td>
      <td height="100" valign="bottom" >Cell #6</td>
   </tr>
</table>
=
Cell #1 Cell #2 Cell #3
Cell #3 Cell #4 Cell #6

 
 
MPF.com Site Map