BuildTheDotCom | CSS Colors

Site Pages

Tutorials

Other Stuff

Best Web Hosting
View our comprehensive reviews and ratings of the top 10 best web hosts.

Rapid Niche Websites
Build rapid niche websites with NIMS, the niche instant mashup site script.

You're Unique. So Are We.
Independent Webhosting Provider at your service. Two Servers with minimum accounts per server guarantee your site will have the operational response you deserve. Your site and your users will LOVE you for the change.

Best website hosting review
Best 10 Web Hosting Reviews by Top Webmasters. Get the most comprehensive reviews on the best web hosts by experienced Webmasters

O`Bannon's Leap
Informative blog that chronicles the ongoing leap of becoming a webpreneur.

See which Web Hosts BuildThe.com has reviewed and recommends >>

CSS Colors in action

If you're not using style sheets in your web design you should be. They centralize the layout and display data into one place, making future updates much easier since you'll only have to edit a single file instead of each page separately, and they tend to speed up page loading for your visitors. Of the many uses for your style sheet, defining the colors of various page elements and fonts is what you'll do a lot of, so here's a brief overview of making use of CSS Colors.

First, there are 16 named colors (colors you may define by name rather than Hex or RGB values):
white
silver
gray
black
aqua
blue
purple
navy
lime
olive
teal
green
yellow
fuchsia
red
maroon

To use any of these in your CSS, you would simply write it like so:

p {
color: red;
}

That would make the text font in all of your paragraphs red. Much easier than having to add "font color" tags to each page of your web site isn't it?

If you keep your site designs to a basic with a minimalist approach you may be able to just memorize this list and be fine. However, most people will want to use colors beyond those 16 at some point, and why not when there are thousands to pick from and most modern monitors are able to display them all?

To use a color which isn't among the 16 named, you would need to find its Hex or RGB value. The easiest way to do this is from a CSS Colors chart.

Having the Hex value for the color you want to use, you would simply write your CSS like so:

p {
color: #ff0000;
}

Once again, that code would make all of your text in paragraphs red. To pick another color, you would just replace the "ff0000" with its Hex value.