Web Development HTML Guide - Learn HTML
Developer Tutorials
ASP
CGI & Perl
CSS
Flash
HTML
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML



Developer Manuals
Learn HTML
Learn PHP
Learn MySQL
Learn CSS
Learn Pear


Developer Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Developer Resources
Developer Tools
Developer News
Developer Forums
Developer Content
Developer Book Reviews
Survey Software

Web Hosting Directory
Budget Web Hosting
ColdFusion Hosting
Dedicated Servers
Domain Hosting
E-Commerce Hosting
Email Hosting
Free Web Hosting
Linux Web Hosting
Managed Hosting
Reseller Hosting
Small Business Hosting
Windows Web Hosting

Font Color

Font colors in styles are set with the color property. For example, this style rule (in a STYLE tag or in a style sheet file) says that all <STRONG> elements should have a font color of red:

STRONG {color:red}

So when we use the <STRONG> tag:

I feel <STRONG>very strongly</STRONG> about this.

we get this:

I feel very strongly about this.

Remember that it's color, not font-color. All the other font related properties begin with the word font. This is the exception.

Color expressions for color work the same as for HTML color attributes. You can either give the name of a color, or a red-green-blue expression. For example, this code creates a class called preppy where the fonts are hot pink: #FF3399. Notice that the RGB color code is preceded by a pound (#) sign just like in HTML:

.preppy
{
color:#FF3399;
font-weight:900;
}

We can then apply the preppy class to a <SPAN ...> element:

I'm feelin' <SPAN CLASS="preppy">fiiiiiiine</SPAN>.

which gives us

I'm feelin' fiiiiiiine.


Copyright Idocs, Inc. Written by Miko Sullivan











About the NetVisits, Inc Network | Advertise
Developer Tutorials hosted by HostGator.
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: