Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the font color in an html table?

Tags:

html

colors

fonts

How do I change the font color in an html table?

<table>
<tbody>
<tr>
<td>
<select name="test">
<option value="Basic">Basic : $30.00 USD - yearly</option>
<option value="Sustaining">Sustaining : $60.00 USD - yearly</option>
<option value="Supporting">Supporting : $120.00 USD - yearly</option>
</select>
</td>
</tr>
</tbody>
</table>

I have tried

<span style="color: #0000ff;"> 
</span> 

in multiple locations ... which doesn't work.

like image 689
ttom Avatar asked May 29 '17 18:05

ttom


2 Answers

<table>
<tbody>
<tr>
<td>
<select name="test" style="color: red;">
<option value="Basic">Basic : $30.00 USD - yearly</option>
<option value="Sustaining">Sustaining : $60.00 USD - yearly</option>
<option value="Supporting">Supporting : $120.00 USD - yearly</option>
</select>
</td>
</tr>
</tbody>
</table>
like image 119
Muhammad Afaq Riaz Avatar answered Oct 06 '22 21:10

Muhammad Afaq Riaz


Something like this, if want to go old-school.

<font color="blue">Sustaining : $60.00 USD - yearly</font>

Though a more modern approach would be to use a css style:

<td style="color:#0000ff">Sustaining : $60.00 USD - yearly</td>

There are of course even more general ways to do it.

like image 21
TomServo Avatar answered Oct 06 '22 20:10

TomServo