Tuesday, July 28, 2009

How do I change text colors in html without changing the background color too?

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 %26lt;body bgcolor="(...)" text="(...)"%26gt; 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.

How do I change text colors in html without changing the background color too?
You can put a font tag in front on the text that you wish to change like this:





%26lt;font color="ff0000"%26gt;Red Text%26lt;/font%26gt;





For the body, change what you have to this:





%26lt;body text="ff0000"%26gt;





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:





%26lt;body bgcolor="ffffff" text="ff0000"%26gt;





You'll end up with a white background with red text.
Reply:You can use the span tag:





%26lt;span style="color:#ff0000;"%26gt;Text here will be red%26lt;/span%26gt;
Reply:%26lt;font color="red"%26gt;text here%26lt;/font%26gt;


you can change the red to any color you want


hope to get best answer in thiz

eurovision song contest

No comments:

Post a Comment