HOW TO BUILD A PROFESSIONAL WEB SITE     Rel. 1.1

LESSON 02 - Chapter c

How to build a Professional Web Site by Carlo Scodanibbio Valid XHTML 1.0!
home course program course leader enquiries enrol testimonials download

Lessons
welcome
1 - chapter a
1 - chapter b
1 - chapter c
1 - chapter d
1 - chapter e
1 - chapter f
1 - chapter g
1 - chapter h
1 - chapter i
1 - chapter j
1 - chapter k
2 - chapter a
2 - chapter b
2 - chapter c
2 - chapter d
2 - chapter e
2 - chapter f
2 - chapter g
2 - chapter h
3 - chapter a
3 - chapter b
3 - chapter c
3 - chapter d
3 - chapter e
3 - chapter f
3 - chapter g
3 - chapter h
4 - chapter a
4 - chapter b
4 - chapter c
4 - chapter d
4 - chapter e
4 - chapter f
4 - chapter g
4 - chapter h
4 - chapter i
4 - chapter j
4 - chapter k
5 - chapter a
5 - chapter b
5 - chapter c
5 - chapter d
5 - chapter e
5 - chapter f
5 - chapter g
6 - chapter a

background of an html document

White is not really the best of colours, is it ? Even worse, if you have an earlier version of Internet Explorer or Netscape Navigator, the background colour would be a dull grey.
In other words "by default" (unless you instruct it otherwise) a Browser renders the background colour of a Web Page "white" or "grey" depending on which version it is.

Let's focus on the BODY section of the HTML Document, and work only between the BODY TAGS (but obviously all other TAGS like <HTML>, <HEAD>, <TITLE>, etc. must remain there....).

<BODY>
</BODY>

Let's dress up the Body of your testpage.html. To change BODY Colour insert the ATTRIBUTE (another form of instruction) BGCOLOR in the BODY STARTING TAG, like this:

<BODY BGCOLOR="#XXXXXX">
This is my first Web Page !!!
</BODY>

The generic XXXXXX is the Colour Code - Colour Codes are explained below.
But first, some remarks:

  • Note that there is always a space between a TAG and an ATTRIBUTE in the Tag
  • A Tag tells the Browser what to do (for instance: "start the Body section of this Document") - an Attribute tells the Browser "how" to do it (for instance: "make this Body background colour green")
  • BGCOLOR is short for BACKGROUNDCOLOR - but note the spelling, COLOR not COLOUR - HTML has been invented and perfected by Americans, not Britons....
  • ATTRIBUTES normally have a "setting" and a "value" (in this case ="#XXXXXX" is the full setting and #XXXXXX is the value of the setting) - a setting is obtained always through the use of an = sign and quotation marks to contain the specified value
  • Also note the # sign preceding the Colour Code (Colour Codes are explained below).

Here are some basic Colour Codes:
RED= FF0000
GREEN= 00FF00
BLUE= 0000FF
BLACK= 000000

There is also a code for WHITE, which I'll display against a black background otherwise you won't see it
WHITE= FFFFFF

How many colours can you choose from as Background Colours of your Page Body ?
In theory 16,8 million colours. But only in theory.

Let me try to explain why in simple wording:
So, every computer has a "graphic card" and a "screen".
Depending on their features and settings, the screen is able to display a certain number of colours. For instance my computer screen can operate in a few "modes" and display, depending on the settings I choose,

  • 16 colours
  • 256 colours
  • 65536 colours
  • 16,8 million colours
Normally I keep the 16,8 million colours setting.

If you want to know which settings you have in your computer, just "right click" with your mouse in any free area (not containing Folders or Files) of your desktop. A menu will appear. (Left) click on "Properties". The "Screen Properties" window will appear. Choose "Settings". Go to the "pull down" Colours menu and click on the arrow. You will see how many different colour settings you have in your computer.
If you are set at 16,8 million colours, you may then choose, as Background Colour of your Web Pages, any of the 16,8 million Colour Codes. BUT....

Think now of your visitors, those Internet Navigators that are sooner or later going to visit your Web Site. What Colour Settings do they have in their computers ? And which Colour Setting have they chosen ? In fact they might not even know they have the possibility of increasing the Colour Setting of their Computer, and they might be working at 256 colours, or even at 16.

With the net result that they might not be able to see your very patiently and carefully selected colour for your Page Background !
For instance, you might have selected a beautiful "light crayfish" pastel colour, and your Visitor's Browser will try to display the closest available colour (a Browser always tries to cope with an unforeseen situation....) - in conclusion your visitor might see a sharp, brutal Red as background colour of your Page !!

OK, OK, this was an extreme example, but always try to think in terms of what your Visitors (or "Users") will be displayed by their Browser, not in terms of what you see in your Computer ! This is a very important rule to which I will come back very often.

Another point to remember is that in many not so developed Countries people are still today using very old computers (which is all they can afford to buy..) with and black and white screens.
So, you will have to start thinking also in terms of your "target audience", or that Internet arena to which you are addressing your Web Site.

If your target market is in highly civilised and industrialised Countries, then do not even bother to consider what I just said and go for any colour you like, not only for your Backgrounds, but also for any other content of your Web Pages (Text, for instance).

Alternatively, as a golden rule, always try to stick to the famous "216 non-dithering colours" also known as the "Netscape 216 Colours", which are listed in Enclosure 06 - the 216 non-dithering colours.

As you can see there are 216 Basic Colours with their Colour Codes just beneath ready to be used to create the wanted backgrounds (and other colourful stuff).
Codes are in "Hexadecimal" notation, created with suitable combinations of the numbers 3 - 6 - 9 - 0 and the letters C and F.
Do not forget the # sign before your Colour Code !
Colour codes are not case sensitive, so #FF0000 and #ff0000 and #Ff0000 are all OK under the HTML 4.0 specifications.

If you wish to know more about the Colour theory and coding, please visit the Web Sites I recommend (you will find them listed in this Enclosure 09 - links to useful Web Sites).


previousgo back to previous chapter shut-down this HTML story ! go to next chapter - if you still have enough energy....next

http://webbuildcourse.tripod.com

full details of this Course at
http://www.scodanibbio.com/webbuild


Copyright © 2001 onwards Carlo Scodanibbio | All Rights Reserved