|
In the previous section I showed you how to use simple HTML tags to change the appearance
of text on a web page - and it worked! But I also said the it shouldn't have done. Simply typing the text straight
onto a blank page as we did then isn't the way you're supposed to do it.
Every web page should have a basic 'framework' which splits the page into two sections - a 'head' and a 'body'. The body is
the part which contains the visible web page, but other information is often included in the head of the document. Let's
look at the HTML code we need to create a proper web page.
Firstly we need to indicate to the user's browser that this is indeed an HTML document. We do this by placing an
<HTML> tag at the very beginning of the document and a matching </HTML> tag at the
very end of the document. Between these tags we place two other pairs of tags indicating the beginning and end of the
'head' section (indicated by <HEAD>...</HEAD> tags) and the 'body' section
(<BODY>...</BODY>).
It's good practice to place another pair of tags within the head section giving the title of our page, for example
<TITLE>Introduction to HTML</TITLE>. The text we place between these tags will be shown on the
title bar of the user's browser, and is also registered by some of the internet 'search engines'.
So our basic page layout will look something like this:
<BODY>
Notice the way in which I've indented the various sections of the document - this is entirely optional, it will make no
difference at all to the look of the finished document, but you will find that it helps you to find your way around the
document while you're creating it.
Notice also that I've used CAPITAL LETTERS for the tags. This also is entirely optional - HTML tags are not case
sensitive, but that's the convention and it does help you to see the tags more easily.
You may like to go back to the previous section and try writing a simple web page using the
proper coding now, or you can continue to the next section called More Text
Formatting where I will tell you about some other ways to change the appearance of text in your document.
|
|||||
|
Last major revision: 22 August 1998 at 02:29 BST Minor revisions: 10 February 1999 at 00:10 BST |
a member of |