DOCUMENT
TAGS

These are the tags which define a HTML page. Most browsers today require
that they by present in your HTML file. Some browsers will still display
the page with them missing, but many will either fail to display the page
or will not display it properly.
<html> </html>
These tags specify this as a HTML page. The <html> tag will always
be the first tag in your file, and the </html> tag will always be the
last tag in your file.
<head> </head>
These tags mark the header of the page. Within this header is where you can
put the page’s title (which is displayed in the title bar of the browser),
any meta information which webcrawlers use (which I will not cover here), and
comments on the author of the page.
<title> </title>
This tag specifies the title of the page and is used within the <head>
and </head> tags. This title is usually the same as the title which is
displayed for the user in the page body.
<body> </body>
This tag specifies the start and end of the page’s main body (i.e., everything
you see on the screen). Options to this tag can alter the pages appearance,
such as adding a background color or image. Using the tag without any options
will display a page with the default grey background and black text. I’ll
discuss this in more detail later.
<!-- comments -->
This is a comment. You can put whatever text you want between the <!-- and
the --> tags, it will not be interpreted or displayed by the browser.
Example

We’ll look at an example using all of these tags. This is the standard layout I
use with my pages. Please note the formatting I’ve used, this is an example of
the scripting style I mentioned before.
Sample 1:
<html>
<head>
<title>Sample Page!</title>
<!-- This page created by Valerie Bradley 13 June 1997 -->
</head>
<body>
Sample page! This is where the body of the page will go.
</body>
</html>
This is how it would look on a browser.
Previous |
Next
This page created by
Valerie Bradley
Last updated:
|