How can one set a font color to be determined by the value of the text enclosed using HTML and/or CSS. The enclosed text is constrained to integer values.
The desired effect is similar to a heat map.
A possible solution might look like this:
<FONT COLOR=function> 1 </FONT>
<FONT COLOR=function> 100 </FONT>
where “function” would resolve to:
<FONT COLOR="red"> 1 </FONT>
<FONT COLOR="green"> 100 </FONT>
Using jQuery something like the following may suit your needs (based on what I think it is you tried to explain):
But I would recommend using classes or style manipulation as the HTML you are proposing to use has been deprecated.