META tags are used to help some search engines index your page, especially if your page has
frames. META tags should be placed between the <HEAD> and </HEAD> tags of your
document. The most common META tags are going to look like this:
|
<HEAD> <TITLE>META examples</TITLE> <META name=" " content=""> </HEAD> |
The name=" " will indicate what type of meta tag you are using. The content=" " will be the content of the tag you provide for the search engine. To make more sense of this, lets look at the META "keywords" tag.
META Keywords Tag
| <META name="keywords" content="meta tags, search, homepage, web sites"> |
- name="keywords"
informs the search engine's spider that a group of keywords should be in this tag. - content="meta tags, search, homepage, web sites"
is your list of keywords and key phrases. In the "keywords" tag, you separate each keyword or key phrase by placing a comma between them.
Be careful not to repeat the same thing too many times here, and be sure the keywords are relevant to the content on your page. The Search Engines are attempting to crack down on people who use these tags to repeat the same word over and over in order to get a better listing, or using keywords that have nothing to do with the content of the page. For instance, if I were trying to get more traffic, I might use the phrase "Pamela Anderson" to get more people to stumble onto this page. As you can see, this page has nothing to do with Pamela Anderson, this is an HTML tutorial!
META Description Tag
The next useful META tag gives a description of your page. Here it is:
| <META name="description" content="How to add META tags to your page."> |
- name="description"
tells the search engine's spider a description of the page is to follow. - content="How to add META tags to your page."
is your very own description of your web page. Type in what you want the description of your page to be, and use some of your key phrases as part of the decription. Many of the search engines use this as the description that will appear in their listings.
Other META Tags
The above tags are the two most useful and popular META tags. There are a couple more that I will mention here, just in case you want to use them.
| <META name="author" content="Your Name"> |
This tag lets you specify the author of the web page. Just insert your name and anyone viewing the source code will know you wrote it. I haven't seen a search engine make use of this tag for indexing purposes yet.
| <META name="generator" content="Notepad"> |
This tag lets you tell everyone what program you used to create your page. Now that you are a Notepad coding machine, go ahead and let everyone know you did it yourself! I haven't seen this used for indexing purposes either, but maybe the engines will let us narrow searches to documents that were coded by hand.....
If your page has moved, or you have a need to redirect your visitors automatically, you can use a meta refresh to send them the page of your choice. Be careful when using this, though, especially on your main page. Some search engines are trained to look for a meta refresh that leads from a page stuffed with keywords to the real page, redirecting the user so quickly that they never see the keyword-loaded page. Thus, if you refresh too quickly (in some cases anything less than 10 seconds is too quickly) you stand the chance of having the page pulled from the listings. Of course, if it is not your main page, you probably won't need to worry about that.
So, how is it done? Well, here is the code that will do it:
|
<HTML> <HEAD> <META HTTP-EQUIV="refresh" content="2;URL=http://www.yoursite.com/newpage.htm"> <TITLE>Page has moved</TITLE> </HEAD> <BODY> whatever you want to write </BODY> </HTML> |
Notice that the refresh tag comes before your title tag. The content=" " command does two things. It tells the browser how many seconds to wait before executing the refresh, and then what url it should be redirected to. Be careful when you write this....the quote marks are around the entire content=" " command, not around the number of seconds or url individually. They are separated by a single semicolon (;).
Of course, you are allowed to write whatever you need in your BODY section. So, if you have a user with a really old browser, you may add a manual link to the new page inside the body section of your page:
|
<HTML> <HEAD> <META HTTP-EQUIV="refresh" content="2;URL=http://www.yoursite.com/newpage.htm"> <TITLE>Page has moved</TITLE> </HEAD> <BODY> This page has moved. If your browser does not automatically redirect you in a few seconds, click <A HREF="http://www.yoursite.com/newpage.htm">here</A> to go to the new page. </BODY> </HTML> |














