How to add a color background to a table

Discussion in 'HTML & Website Design' started by chrisj, Aug 17, 2007.

  1. #1
    How can I add a color background to this table?


    
    <table width="100%">
    	<tr><td align="center"><b>Site home page</b></td></tr>
    	<tr><td align="center">&nbsp;</td></tr>
    </table>
    Code (markup):

     
    chrisj, Aug 17, 2007 IP
  2. vamshikrishna

    vamshikrishna Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think You can use like this

    <table bgcolor="lime" border="1"><tr>
    <td>A lime colored table background using color names.</td>
    </tr></table>

    <table bgcolor="#ff0000" border="1"><tr>
    <td>A red colored table background using hexadecimal values "#FF0000".</td>
    </tr></table>

    <table bgcolor="rgb(0, 0, 255)" border="1"><tr>
    <td>A blue colored table background using RGB values "rgb(0, 0, 255)".</td>
    </tr></table>
     
    vamshikrishna, Aug 17, 2007 IP