It would be great if you use :hover
pseudo class over the onmouseover
event
td:hover
{
background-color:white
}
and for the default styling just use
td
{
background-color:black
}
As you want to use these styling not over all the td
elements then you need to specify the class to those elements and add styling to that class like this
.customTD
{
background-color:black
}
.customTD:hover
{
background-color:white;
}
You can also use :nth-child
selector to select the td elements