HTML CSS IMAGES LINKS
 
HTML → Table alignment, bgcolor, and size

We can specify the

  • WIDTH and HEIGHT of a table and/or a table cell
  • ALIGNMENT of contents within CELLS and/or ROWS
  • Background color

    Here is an example:

    Cell ONE Cell TWO
    Cell THREE Cell FOUR

And here's the code:

<table border="1" width="640" height="500">
<tr valign="top">
<td width="200" height="200" bgcolor="#00CCFF" align="right"> Cell ONE </td>
<td width="440" height="200" align="middle" bgcolor="#CCCC99"> Cell TWO </td>
</tr>
<tr align="middle">
<td width="200" valign="top" height="300" bgcolor="#669999"> Cell THREE </td>
<td width="440" height="300" valign="bottom" bgcolor="#9999CC"> Cell FOUR </td>
</tr>
</table>



 
  back ↑