HOME      HOSTING PLANS      DOMAINS      CONTACT US      TERMS OF USE
Support        Resellers        cPanel Demo        Video Tutorials        FAQs        Banner Creator        Network        About Us
HTML TUTORIALS Web Hosting - HTML tutorials




               HTML Lesson 4

Hexadecimal numbers/colors

In the world of design and creating HTML bodies, tables, cells...brings on a big world of playing with color. In HTML, you can assign colors in your <body>, <table>,&lttd>m tags and more by just dropping the name of the color in.

<table bgcolor="red">         <body bgcolor="black">

The bgcolor stands for back ground color

Instead of using exact names, you can use what is known as hexadecimal coding.

Hexadecimal code is a six digit code used to describe colors to the browser through HTML. This makes it possible to have endless shades rather than having to deal with names for twenty-five shades of burnt orange. It'd get kind of ridiculous.

Hexadecimal is composed of 3 sections of 2 digits. Two for red, two for green, and two for blue (which is also known as RGB color scheme).

R
G
B
00
00
00

The hexadecimal system is based on the number sixteen, and within HTML relate to a value of brightness. It ranges from:

0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F

0 is equal to having no value (black) and F has the highest value (white).

For each color there are two digits for each color(r,g,b) ranging 00, 01, 02, 03, 04, 05, 01, 07, 08, 09, 10, 11, 12... ......on up to........EC ,ED ,EE ,EF ,FA ,FB ,FC, FD, FE, FF

Each R, G & B will each have their own code which will be compiled and blended to make a unique hue of color.
When adding a hexadecimal code to an HTML tag, you always add the number(#) sign.

For example: #FFFFFF is WHITE
You may use either....but there are alot of shades and colors that only have hexadecimal numbers.


The proper way of a body tag would look like:

<body bgcolor="#000000">

That would create a page's body background to be black.


Below is a list of some, but not all colors.
(more color charts can be found via a yahoo search like this one.  Click here)  

    # FFFFFF  
    # FF0000  
    # 00FF00  
    # 0000FF  
    # FFFF00  
    # FFFFFF  
    # FF00FF  
    # BBBBBB  
    # 808080  
    # 555555  
    # 000000  
    # 003399  
    # 993300  
    # 00FF33  
    # 0099FF  
    # 999933  
    # FF9900  
    # 666699  
    # 9933FF  
    # CCCC00  
    # FFCC66  
    # FFCCFF  
    # 000080  
    # 666633  


Return to Top     Contact Us