Background color for table

How do I add a background color to the following:

<table>
<tr>
<td style=“border: 1px solid black;”>
<br>
<p><font size=“5”><i><b>“I hope you all have a great Thanksgiving, with all the trimmings. Take the time to spend it with loved ones, and remember they are the real treasures in your life…”</p>
<br>
</td>
</tr>
</table>

To keep with your code:

<table>
<tr>
<td style="border: 1px solid black; background: #def;"> 
<br>
<p><font size="5"><i><b>"I hope you all have a great Thanksgiving, with all the trimmings. Take the time to spend it with loved ones, and remember they are the real treasures in your life...."</p>
<br>
</td>
</tr>
</table>

Though you should not use inline style.

Here’s a complete example to play with. It’ll show you how to achieve the same result, using different approaches… and even w/o using tables :slight_smile: You’ll notice in the right way and w/o tables I’ve added a little left and right padding.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
  "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en"><head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Form</title>

  <style type="text/css">

    #thanks {
      border:1px solid black;
      font-size:1.5em;
      font-style:italic;
      font-weight:bold;
      background:#def; 
      padding: 1.5em .5em;
    }

  </style>

</head><body>

  <h1>Tables style</h1>
  <h2>The right way</h2>
  <table id="thanks">
    <tr>
      <td cellpadding="0">"I hope you all have a great Thanksgiving, with all the trimmings. Take the time to spend it with loved ones, and remember they are the real treasures in your life...."
    </td>
    </tr>
  </table>

  <h2>The old way</h2>
  <table>
<tr>
<td style="border: 1px solid black; background: #def;"> 
<br>
<p><font size="5"><i><b>"I hope you all have a great Thanksgiving, with all the trimmings. Take the time to spend it with loved ones, and remember they are the real treasures in your life...."</p>
<br>
</td>
</tr>
</table>

<h2>W/o Tables</h2>
<p id="thanks">"I hope you all have a great Thanksgiving, with all the trimmings. Take the time to spend it with loved ones, and remember they are the real treasures in your life...."</p>
</body></html>

Thanks, as usual…it worked. Appreciate it.

and if you want to add the background color to the whole table then just use
<table width=“200” border=“1” bgcolor=“#00FF00”>
<tr><td></td>
</tr>
</table>

Or you could join the 21st century :cool:
How about table#whatever {width:200px; border:1px solid; background-color:#0f0;}?