1. Computing

Discuss in my forum

Colorizing the Web

Color Can Add Vitality and Life to a Dull Web Page

By , About.com Guide

When you're starting to create your Web page, keep in mind that there are many ways to add interest and vitality to your site. A great way is to use color. Color can be used in tables, as backgrounds, and fonts.

Named Colors

There are different ways of adding color to your pages. One of the easiest ways is to used named colors. These are just what you think they are: color names like red, blue, green, and purple.

But some browsers don't render color names, or they render them differently than other browsers. So, that's why it's better to use hexadecimal codes for your color names.

Hexadecimal Codes

These are the codes that define colors. They are groups of three hexadecimal (base 16) numbers. The first number is red, the second green, and the third blue. Each hexadecimal number is an RGB triplet. 00 is the lowest hue, and FF is the highest. For example, red is ff0000, blue is 0000ff, green is 00ff00, and purple is 990099.

Putting Color in Documents

Using CSS to add color is easy. The most common method of putting color in your documents is with the <style> attribute. Choose the color you would like your text to be, enclose it in a span tag, and use the style attribute to assign a color. e.g.

<span style="color : #ff0000">red</span>

Another way to add color is to use it as a background color on tables. Just add the background-color style to the table, tr, td, or th tags. You can add color to your entire page with the on your body tag. e.g.

<body style="background-color: #0000cc;">

You can do some interesting things with CSS and color.

You can change the font color

<span style="color : #0000ff">change the font color</span>

or change the background color behind the font.

<span style="background-color : #ccccff">change the background color</span>

Use color to breathe life into your Web pages. Color can be a lot of fun.

Previous Features

©2013 About.com. All rights reserved.