HTML Tables Tutorial

Page 24 - <tr> bgcolor


If you want every cell in a row to be a certain color, 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 color of a cell by placing the bgcolor attribute in the <td>.


<table border="1" width="300" >
   <tr bgcolor="#ccccff">
      <td>Cell #1</td>
      <td>Cell #2</td>
      <td bgcolor="#ffffcc">Cell #3</td>
   </tr>
   <tr>
      <td>Cell #4</td>
      <td>Cell #5</td>
      <td>Cell #6</td>
   </tr>
</table>
=
Cell #1 Cell #2 Cell #3
Cell #3 Cell #4 Cell #6

 
 
MPF.com Site Map