John Cletheroe's
PC and Internet Hints


Web Page Creation Hints and Resources - Format of a Web Page

While there are a large number of tutorials available on HTML, the language in which web pages are created, most concentrate on the individual tags (commands) and fail to explain the overall format of a web page. This page is an attempt at such an explanation.

The overall structure of an HTML file, i.e. of a web page, is as follows:

<HTML>
<HEAD>
<TITLE>
The title goes here
</TITLE>
<META NAME = "keywords" CONTENT = "
The keywords go here, separated by comments">
</HEAD>
<BODY>
...
...
...
The main part of the web page goes here and will normally take up numerous lines
...
...
...
</BODY>
</HTML>

The <HTML> and </HTML> tags enclose the entire file.

The <HEAD> and </HEAD> tags enclose the head.

The <BODY> and </BODY> tags enclose the body.

In the head, the <TITLE> and </TITLE> tags enclose the title. This will appear in the title bar of the web browser when the page is viewed. More importantly, it will form the title of the page if you register the page with a search engine. Therefore the choice of text for the title needs to be given very considerable thought if you want people to find your page when using a search engine.

In the head, the <META> tag is optional. It only affects how your page is indexed by some search engines. The format of the <META> tag is peculiar. If you include it then it is worth giving very considerable thought to your choice of keywords so as to increase the chances of your page being found.

Some HTML tutorials mention that a document type should be specified in the head. All such mentions that I have read have been extremely vague about this and in practice it doesn't seem to be necessary.

The <BODY> tag which introduces the body can have a number of optional clauses. These include clauses to specify the colour of the background (BGCOLOR = "#rrggbb"), the default text colour (TEXT = "#rrggbb"), the colour of hypertext links (LINK = "#rrggbb"), the colour of active hypertext links (ALINK = "#rrggbb") and the colour of visited hypertext links (VLINK = "#rrggbb"). An active hypertext link is one on which the mouse is clicked but not released. A visited hypertext link is a link to a page which you have visited (usually there is a time limit). These clauses can be used as in the following example:

<BODY BGCOLOR = "#FFFFFF" TEXT = "#000000" LINK = "#0000FF" ALINK = "#FF0000" VLINK = "#FF6600">

The <BODY> tag can take other clauses and there are other methods of setting the background and text colours.


Web Page Creation Hints and Resources

PC and Internet Hints


About this personal web site JohnCletheroe

EMail me

Most recently modified 25-Mar-01