same colored <tr>'s

liunx

Guest
How can I make it so that all the <td> in a <tr> are the same color without haveing to repeat the <font> thing three times for each row? Here's what I have but I'd think there would be an easier way.<br />
<br />
<br />
<table><br />
<tr><br />
<td><font color="#FF0000">This row is Red</font></td><br />
<td><font color="#FF0000">This row is Red</font></td><br />
<td><font color="#FF0000">This row is Red</font></td><br />
</tr><br />
<tr><br />
<td><font color="#00FF00">This row is Green</font></td><br />
<td><font color="#00FF00">This row is Green</font></td><br />
<td><font color="#00FF00">This row is Green</font></td><br />
</tr><br />
</table><!--content-->Hi, <br />
<br />
Try css<br />
<br />
here is an example<br />
<br />
first type this into ur html document...<br />
<br />
<LINK REL=StyleSheet HREF=http://www.htmlforums.com/archive/index.php/"Font.css"><br />
<br />
now make a file called 'Font.css'<br />
<br />
open it with notepad and copy and paste the following into it...<br />
<br />
td {color: red;}<br />
<br />
save it<br />
<br />
and there you go when every you type <td>This row is Red</td> in the html document the text will be red.<!--content-->woops for got to add this: You can do many many different things with css but mainly i use it as short cuts for such as you asked. I strongly suggest you invest a little time into finding out more about it.<!--content-->
 
Back
Top