As more and more social sites enable their users to make out custom HTML codes for their homepages, many want to learn about HTML and how to write and modify web pages by HTML.
One of the most common questions for a HTML newbie is to change the color of some text or font in the page.
To do this in a web standards way, you just add a styling directive to that HTML element / tag:
<p style="color: red">We are red.</p>
In the example above, the text ‘We are red.’ has now become red on the web page.
You can also change the color of a piece of the text (inline text) by the help of HTML tag SPAN:
<p style="color: red">We <span style="blue">are</span> red.</p>
Now the word ‘are’ are colored blue.
For a list of available HTML colors, please refer to this page.
1 thought on “HTML: Change Text and Font Colors”
Very helpful stuff. I always seem to forget to just use a span style one for some reason. Maybe my brain is fried, or maybe its just age…regardless, this is a nice tip. 🙂
Comments are closed.