Question:
How do I change text colors in html without changing the background color too?
Jackson A
2007-05-02 19:32:45 UTC
Well, I am quite new to html, I've been using it for a while. But i seem to have one problem when editing sites - I can't find a specific code to only change text color.

I know the code is to change the background with it, but I am yet to find a way to alter only the text color. If someone could provide me with a code to change a color, I would be most pleased.
Three answers:
gcnewsome
2007-05-02 19:40:18 UTC
You can put a font tag in front on the text that you wish to change like this:



Red Text



For the body, change what you have to this:







That will make all text red.



You don't have to declare a background color, but if you want it to be the same on all browsers (the default color might not be white on someone elses computer) you can do this:







You'll end up with a white background with red text.
xoxoMaRgExoxo
2007-05-02 20:57:18 UTC
text here

you can change the red to any color you want

hope to get best answer in thiz
Chris S
2007-05-02 19:42:32 UTC
You can use the span tag:



Text here will be red


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...