color cells

They have: 2 posts

Joined: Apr 2000

below is the html i am stuck with

<html><head> </head>

<body> <div align=center><table border=2 width=150>
<tr bgcolor=PINK ><td align=center><td> 1994 <td><td>1995 </td>
<tr bgcolor=yellow><align=center></td>
<tr bgcolor=green><td align=center><td><td>1996</td>
<tr bgcolor=purple><td> 1997</td>
</table>
</html>

I want to have a table of different colored cells in each row, can anyone suggest any ammendments I would need to make?

They have: 334 posts

Joined: Dec 1999

Sure, to get the cells to have different colors apply the BGCOLOR property to the <TD> tags instead of the <TR> tags:

But to begin, whoever "stuck" you with that code should be soundly thwapped. It's completely useless. None of the tags are properly opened or closed, so it's not going to display properly no matter how you add the color attributes.

<TABLE border="2" width="150">
<TR>
<TD BGCOLOR="pink"></TD>
<TD BGCOLOR="green"></TD>
<TD BGCOLOR="blue"></TD>
</TR>
<TR>
<TD BGCOLOR="yellow"></TD>
<TD BGCOLOR="navy"></TD>
<TD BGCOLOR="gray"></TD>
</TR>
</TABLE>

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.