<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd"
<HTML>
<HEAD>
<TITLE>
BODY, Colours and Backgrounds
</TITLE>
</HEAD>
<BODY TEXT="#000000"
LINK="#0000FF"
VLINK="#FF0000"
ALINK="#00FF00"
BGCOLOR="#FFFFFF">
|
|
<H1 ALIGN=Center>
</H1>
|
BODY, Colours and Backgrounds
|
<P>
|
The <BODY> and </BODY> tags indicate the part of an
html document that contains the text and graphics etc.
that are to appear on the screen. The <BODY> tag
appears immediately after </HEAD>, and </BODY> is at
the bottom of the document, immediately before </HTML>
|
</P>
|
|
<P>
|
The <BODY> tag can be used to specify the colours that
a browser is to use for text, for links and for the
background when displaying the page. Each takes a
similar form. This page, for instance,
specifies black text, links which are blue if the pages
they point to have not been visited before, red after
they have been visited and green while the link is
active (i.e. being clicked on.) The background is
white.
|
</P>
|
|
<P>
|
This specification is written like this.
|
</P>
|
|
<PRE>
|
<BODY TEXT="#000000"
LINK="#0000FF"
VLINK="#FF0000"
ALINK="#00FF00"
BGCOLOR="#FFFFFF">
|
</PRE>
|
|
<P>
|
While it is clear that the various parts indicate TEXT
colour, LINK colour, VisitedLINK colour, ActiveLINK
colour and BackGroundCOLOuR, the way the colours are
represented may be puzzling.
|
</P>
|
|
<P ALIGN=Center>
<A HREF="hex.htm">
</A>
</P>
|
how colours are represented
|
<P ALIGN=Center>
<A HREF="fuchia.htm">
</A>
</P>
|
a page with white text on a fuchia background
|
<P>
|
Most html editors automate the process of turning a
specified colour into the hexadecimal representation.
|
</P>
|
|
<HR>
|
|
<P>
|
If the colours to be used are not specified, then browsers will
display the page using default settings. Default settings vary
from browser to browser.
|
</P>
|
|
<P ALIGN=Center>
<A HREF="plain.htm">
</A>
</P>
|
a page with no colours specified
|
</P>
|
|
<H3 ALIGN=Center>
</H3>
|
Backgrounds
|
<P>
|
In addition to specifying colours, an image can be specified as
a background for the page. The image is held in a file, usually
in .gif format. (See the page about images for an explanation
of this.)
|
</P>
|
|
<P ALIGN=Center>
<IMG SRC="flowers.gif">
|
|
</P>
|
|
<P ALIGN=Center>
<A HREF="flowers.htm">
</A>
</P>
|
a page using BACKGROUND="flowers.gif"
|
<HR>
|
|
<P ALIGN=Center>
<A HREF="contents.htm">
</A>
</P>
|
Contents
|
</BODY>
</HTML>
|
|