How would I add color to the text here? I'm stuck on this

How would I add color to the text here? style="color:red;

<input type="hidden" name="on0" value="text">text</td></tr><tr><td>

How come style="color:red; isn't working and how can I get it to work?

As you’ve only shown a broken fragment of HTML, which doesn’t include the colour information, who can say?

If you post the full code, including the styling information, wherever you’re applying it, you stand a better chance of getting an answer.

(I’ve said it before and I’ll say it again: think about how you ask your questions before posting. A question with full information is far more likely to receive a useful reply.)

Which element are you applying it to?
I don’t tags see any visible element with content in the code you posted.
The only content you posted is the word “text”, but I don’t see the opening <td> tag for it.

Just the “text”

<table>
<tr><td><input type="hidden" name="on0" value="text">text</td></tr><tr><td><select name="os0">
 <option value="Blue">Blue</option>
 <option value="</option>
 <option value="</option>
 <option value="</option>
</select> </td></tr>
</table>

I asked which element, “text” is content, not an element. I which tag are you placing the style attribute?

style="color:red;

I’m just trying to change the color of “text”

value=“text”>text<

As I said,

It’s no good posting odd words here and there which are unconnected. Post the whole thing, and include the style="color:red" on the element you intend it to apply to.

text
value="text">**text**</td>

This is the whole thing
<table>
<tr><td><input type="hidden" name="on0" value="text">text</td></tr><tr><td><select name="os0">
 <option value="Blue">Blue</option>
 <option value="</option>
 <option value="</option>
 <option value="</option>
</select> </td></tr>
</table>

OK. And where are you applying style=“color:red”? Add it to your code in the relevanrt place.

For the last time, in which element (html tag) did you try placing the style attribute when it failed to work?

value=“text”>

That is a hidden form element. How do you expect to add colour to a hidden (invisible) element? :upside_down:

3 Likes

So it can’t be done then? or do i put it in a different spot?

What can’t be done? As @SamA74 says, you are currently trying to style a hidden element, which is clearly nonsense. If you explain what you’re trying to achieve, we may be able to find another way.

(BTW, is this intended for use, ar are you just playing with PayPal form code as a learning exercise?)

I just wanted to know if I could change the color of the text in that spot.

And yes, it’s intended for use.

But that text is hidden, as has already been pointed out. What is the purpose of trying to style it?

If you are intending to use PayPal to receive payments, then I would advise you to be very cautious of meddling with the form code when you don’t fully understand what you’re doing.

Does this tell you anything?