Howdy

How to create your own web site - Part 6

Brought to you by The Phoenix On-Line Foundation and Slippy...AKA...Ian

 

In this part I'm going to put together a mix of all sorts including some additional explanations, refinements and a look at sound. Without ado.. lets get going.

 

Using the <META> tag.

The big search engines like AltaVista, Ecite, Webcrawler etc.. are always scouring the web for new and updated web sites. The chances are that one day, they will come across your humble pages and add them to their massive databases. There is a way to ensure that your page comes out nearer the top of the list, when someone runs a search for topics related to your site. The way of doing that is to use a couple of special <META> Tags. These tags are inserted between the <HEAD> & </HEAD> tags and define key words and a description of your site that the search engines use.

First the description of your site;....
<META HTTP-EQUIV="Description" NAME="Description" CONTENT="Your site description goes here!">

Now for the keywords that the search engine will use to match with the search criteria;.....
<META HTTP-EQUIV="Keywords" NAME="keywords" CONTENT="keyword1, keyword2, keyword3, keyword4, keyword5, ... etc etc ">

To make sure that your keywords are compatable with most engines, always put your keywords in lower case.

 

There is another clever use of the META tag, that may not be well known and thats a special one that can redirect visitors to a new site or page. If you're like me, and like a particular site you visit, you may decide to add it to your favourites. Thats fine, untill the site owner moves or renames the page. Good practice says you don't remove pages, Yes you can move the page, but leave a page of the same name there which re-directs visitors to the new page. This type of page is called a "century 21 page" . Users of Netscape or IE can use a clever feature called "client pull" which AUTOMATICALLY sends the visitor on to the new page.

The META tag to do this is;....
<META HTTP-EQUIV="REFRESH" CONTENT="5" URL="your new site/page address goes here">

Here the browser will automatically refresh the page but to the URL address you give. Note the content="5". This could be any number, it is infact a number of seconds to wait before re-directing. You would therefore make a very simple page saying that the page has moved and put the client pull META in the header as with the others.

 


 

Adding Sound

There are 3 sound file formats commonly used for web pages.

.AU supported by both netscape and IE it is most often found in the web soundscape.
.WAV the standard windows format, supported by all versions of IE & netscape 3.0 upwards. Earlier versions of netscape would need a "helper "application to play WAV files.
.MID supported by IE and Netscape 4.0 upward.

 

Sound links.
A simple way to play a sound is to provide it as a link, such as...
<A HREF="burp.wav">click here for a special welcome!</A> which would play the wav if the users browser suported WAV file format.

 

Embedding sound files.
Another way to add sound files to your page is to use the <EMBED> tag. This is supported by IE & Netscape Navigator. The simple syntax is;..
<EMBED SRC="soundfile.mid">
What this tag does is to add a player to the web page, which will play the sound file when the user clicks on the play button. However there are some extras you can add to the tag;...
<EMBED SRC="soundfile.mid" AUTOSTART=TRUE>; ... makes the player start playing straight away.
<EMBED SRC="soundfile.mid" AUTOSTART=TRUE LOOP=value>... makes the player repeat the sound however number of times you put in "value"
<EMBED SRC="soundfile.mid" AUTOSTART=TRUE HIDDEN=TRUE>... the hidden atribute makes the browser hide the controls.
These atributes can be combined together in one EMBED tag just like using other tag attributes.

 

Background sound.
The other way to add sound to your page is to use the <BGSOUND> tag. This is specifically used by IE. It is in effect the same as the EMBED tag with the AUTOSTART set at TRUE. It automatically plays a sound file as the page is opened. Just as with EMBED you can use the LOOP attriubute. BGSOUND does not show a player on the page.

 


 

Some extras on frames

Last time we looked at creating a simple frame based web site. And we looked at how you use the TARGET atribute to determine which frame a page loaded into. Well here are a few extra atributes that can help in assigning the target frame for pages.

Firstly there are a number of pre defined frame names that browseres automatically recognise...
-self   Loads a new page into the same frame that had the link.
-top   Loads the new page into the entire window.
-blank   Loads the new page into a new browser window.

But you may not need to define the target if you always load to the same window. You can set a DEFAULT frame for files to be loaded into. To achieve this you need to add <BASE TARGET="frame name"> between the <HEAD> & </HEAD> tags. This will cause the browser to send every linked page to the default frame.

Good Luck!

 

Still to come...

Creating Lists
Using Tables
Making a FORM
JavaScritpt

 

| Part 5 | Part 7 | Home |