Thursday, January 12, 2012

Tip #58: HTML Colored Text

If your blog editor is like mine, there are limited things you can do with text. You can probably bold-face it or make it italics, but you may not be able to change the text color. In the early days of html you would just use the <font> tag, but, alas, the <font> tag has been deprecated (phased out). The preferred method is to use the <span> tag.

I searched all over to find the replacement for <font>. Everyone insisted on using cascading style sheets (CSS). Well, for entire web pages, I agree, but for a single word or a single phrase, creating a CSS style for a color seems like code-bloat to me. Finally, I found the solution, and here it is for you to use.

<span style="color:orange;">Your Text Here</span>


Want to know more, see <span>



[Back to the Main Site]