Dynamic Table Cell Properties

I'm adding a table cell dynamically, and I need to know the attribute for cell background color. If anyone knows, I'd appreciate it.

<style>
td, th {bgcolor: #CCCCCC)
</style>

...

<a onClick="addRow('c_components', 'Tower', 'c_tower', 'c_tower_desc')">click me</a>
<script language=javascript>
function addRow(group, name, variable, description_variable)
{
  table = document.all.insert;
  tr = table.insertRow( table.rows.length);

  cell = tr.insertCell();
  cell.align = "center";
  cell.bg="#CCCCCC"
  cell.width = "40%";
  cell.innerHTML = "&nbsp;";
 
  cell = tr.insertCell();
  cell.align = "center";
  cell.bgcolor="#CCCCCC"
  cell.width = "5%";
  cell.innerHTML = "<input type='checkbox' name='" + group + "' value='" + variable + "'>";

  cell = tr.insertCell();
  cell.align = "center";
  cell.color="#CCCCCC"
  cell.width = "35%";
  cell.innerHTML = "<div align='center'>" + name + "</div>";

  cell = tr.insertCell();
  cell.align = "center";
  cell.backgroundcolor = "#CCCCCC"
  cell.width = "20%";
  cell.innerHTML = "<input type='text' name='" + description_variable + "'>";
}

</script>
ALoPrestoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sveinung2Commented:
HTML-attribute: bgcolor

Javascript CSS: style.background or style.backgroundColor

CSS: background or background-Color
sveinung2Commented:
<style type="text/css">
<!-----
td {background:black}
tr {background:black}
--->
</style>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sciwriterCommented:
Table --

<TABLE border="0" cellspacing="1" cellpadding="1" align="center" bgcolor="#888888"> </TABLE>

Cell:

<TD bgcolor="#FFFFFF" valign="top"> </TD>
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.