How To Create A WebsiteHow To Make A Website

HTML 4

How 2 Create A Website | HTML 4 Tutorials - CSS Introduction


bookmark website

 
Working with CSS Colors

If you apply colors in html 4 then it is important to have the color number in hexadecimal and a preceding "#" character e.g.

color="#FF00FF"

The six number hex value represents, red-green-blue (RGB) that form the color.

Color names are represented in either hexadecimal numbers or color names. You can specify any color by its hex value or choose from 16 color names.

16 HTML Named Colors And Hex Values
Name

Hexadecimal Value

Color

     
aqua #00FFFF  
black #000000  
blue #0000FF  
fuchsia #FF00FF  
gray #808080  
green #008000  
lime #00FF00  
maroon #800000  
navy #000080  
olive #808000  
purple #800080  
red #FF0000  
silver #C0C0C0  
teal #008080  
white #FFFFFF  
yellow #FFFF00  

An example of a styling tags in the head section.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<head><title> CSS Styling </title>
<meta name="Description" content="Your description here...">
<meta name="Keywords" content="Your keywords here...">

<style type="text/css"> body

.body
{
font-family: Arial,sans-serif;
color: #008000;
background-color: #FFFFFF;

line-height: 1.166;
margin: 0px;
padding: 0px;
}

</style>

</head>
<body>

<h1 class="body">This an example of CSS</h1>

</body>

</html>

The result will be as follows:CSS Color Example

 

 

You can also use the color name in the hexadecimal value place which will give the same result:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<head><title> CSS Styling </title>
<meta name="Description" content="Your description here...">
<meta name="Keywords" content="Your keywords here...">

<style type="text/css"> body

.body
{
font-family: Arial,sans-serif;
color: #green;
background-color: #white;

line-height: 1.166;
margin: 0px;
padding: 0px;
}

</style>

</head>
<body>

<h1 class="body">This an example of CSS</h1>

</body>

</html>

 

next | working with css continued

 

 

| Create a Website | Get Traffic to Website | Make Money Online With Website | About Us | Contact Us |

© 2008 How-2-make-a-website.com