+ 2
Anybody know how to change the color of the text inside a table ....is it through css. or html
3 Antworten
+ 4
I recommend you use CSS for styling anything in your code. Here's an example of how you can style it.
Example (CSS):
td {
color:blue;
}
/*Will style all data cell text blue*/
th {
color:red;
}
/*Will style all header cell text red*/
+ 4
<table> <tr> <td>test with longish string<br/> over two lines<td> <td><span class="bg" >test</span></td> </tr> <tr> <td>test with longish string<br/> over two lines<td> <td>test with longish string<br/> over two lines<td> </tr> </table>
<table width="100" height="100" border="2"> <tbody> <tr> <td bgcolor='red'>This is Red</td> </tr> <tr> <td bgcolor='blue'>This is Blue</td> </tr> </tbody> </table>