HTML - Using colours


HTML Intro
 
 
 
 
 
 

Web safe colours are defined as those which will reproduce well on screen. Colours are described in numerical values, the most usual being RGB (red, green, blue) or Hexadecimal codes,  although some of the the main colours can be written eg white, black, red, blue, yellow.

Hexadecimal codes are the usual way to define colours when coding in HTML. There are lots of resources online to support your learning on this topic. Here are some to start you off.

http://www.visibone.com/colorlab/
http://www.htmlref.com/Reference/AppE/colorchart.htm

The barebones web site  - lots of hints and tips about all things HTML

http://www.btplc.com/age_disability/ClearerInformation/Colours/index.htm: check this out for fascinating facts about making your colours accessible for people with colour-deficient vision. Also handy info and tips about web safe colours.

Note the spelling of color.  The hex codes consists of 6 characters (in pairs) and web safe ones are made up of either 00, 33, 66, 99, cc, ff  only. Always include the quotes and the # symbol.

To add colour to your page: Add the colour attributes to the <body> tag.  They can be added in any order

background:  bgcolor="#??????" Formats the colour of the page background
text
: text="#??????"  This will change the colour of all the text on the page at once.
link
="#??????" This changes the colour of an unvisited link
vlink="#??????" This changes the colour of a visited link
alink="#??????" This changes the colour of an active link - as it is being clicked on

 

Font Formats

Although the font tag is deprecated (being phased out), browsers still understand it. To alter the appearance of some text add the following tags

<font face="Verdana" size ="2" color="red"> text goes here </font>

The text will appear like this: text goes here

 

email me | top