Web Page Ingredients

There are several html tags that are necessary in every web page. Here they are in the order used within a web page:

There are a few that virtually every web page MUST have in order to work with the browser.

html tag What it does
< html >Starts a web page. Put this on line 1.
< head > Starts a heading which can contain many things we will learn about later. This is on line 2.
< title > puts a title in the blue area on the very top of the page. This is also on line two followed by your title text.
< /title > Ends the title. Still on line 2.
< /head > Ends the heading. Last thing on line 2.
< body > Starts the main part of the page. Line 3.
< /body > Ends the main part of the page. Second to the last line.
< /html > Ends the page. Last line of the page.
 

It should look like this:

<html>
<head><title>Title in the blue area.</Title></head>
<body>

This area is for web page content.

</body>
</html>

 

You will notice that as you are building pages sometimes these tags get into the wrong place and the page appears to work fine. That is not always the case so make sure they are in the proper location. 

Here are four other rules to live by:

        All tags and file names should be in lower case (Dog_cat.JPG will NOT work on many systems). 

        Do not allow spaces in file names (dog cat.jpg should be dog_cat.jpg or dogcat.jpg).

        Put the period in the right place and only use it once. There are only three letters following the
        period although sometimes you will see four. For maximum compatibility use three. 

        Use only letters, numbers, underscores, and dashes in filenames. 

It is a good idea to build a text file with these tags already in place. This file can be used as a template or starting point for all future web pages (file, save as...). As you become more familiar with how to build pages you will put other items in the template.

Assignment

Create a file that looks like the example using notepad (usually Start, Programs, Accessories, Notepad).

Save it in your directory as index.htm

Don't forget the .htm or this file will not work with the browser.

Open Netscape or Explorer and view your page. The process is different for the two browsers but starts with File, then Open or Open page.

If it doesn't work then you have either typed one or more tags incorrectly or not saved it as .htm.

 

Back to the outline.