-2

How do I change the color of this text: You Have Already Earned Credit For This Link.

    <div id=\"myform\" style=\"visibility: hidden;\">
<font size=2><b>You Have Already Earned Credit For This Link.</b></font>
</div>

This is a PHP and HTML file. Thank you very much indeed!

ADyson
  • 57,178
  • 14
  • 51
  • 63
  • 2
    hint: something goes in the style tag. – Kinglish Jun 07 '21 at 17:34
  • 2
    The "font" tag is deprecated. Learn how to use CSS. And this has nothing to do with PHP – ADyson Jun 07 '21 at 17:39
  • Does this answer your question? [Change a HTML5 input's placeholder color with CSS](https://stackoverflow.com/questions/2610497/change-a-html5-inputs-placeholder-color-with-css) – Anonymous Jun 08 '21 at 01:06

2 Answers2

0

You can do so by doing the following: Wrap your text in a paragraph tag, and apply the following CSS styling:

p {
  color: red;
}
<div id="myform">
<b><p>
You Have Already Earned Credit For This Link.
</p></b>
</div>
BeerusDev
  • 1,444
  • 2
  • 11
  • 30
0

I was able to change to font color by adding color=white like this:

   <div id=\"myform\" style=\"visibility: hidden;\">
<font size=2 color=white><b>You Have Already Earned Credit For This Link.</b></font>
  • 1
    This is old fashioned code, deprecated and could in theory stop working in the future, browsers are not obliged to support it. Using CSS is a much better solution - see the other answer – ADyson Jun 07 '21 at 18:57
  • 1
    Not only should you not be using `color="white"`, you also shouldn't be using `size="2"`, ``, or ``. The other answer is on the right track, but it's also bad because it's nesting an unnecessary `

    ` tag inside of the ``.

    – Roddy of the Frozen Peas Jun 07 '21 at 20:10