What's a Metatag and why should I use one?
One of your site's biggest keys to success will be its ability to be found on the host of Search Engines on the World Wide Web. Without this, no one will know your page is there, and all this spiffy HTML coding you are learning will be useless to you. Therefore, learning to code and present your MetaTags properly is essential.
PROPER WAY TO CODE THE METATAG:
The <META> Tag is a little bit different than the Tags we have already covered. The <META> Tag is known as a one-sided Tag since it requires no Closing Tag whatsoever.
Let's look at an example of how the <META> Tag is used. I took this example directly from one of my pages so you can see how it all works. Plus, if you need to, you can cut and paste this example straight into your page:
<HEAD>
<TITLE>
Gazoo's Gold - HTML, Sound & Wave links, Humor, FREE Postcards... plus more!
</TITLE>
<META NAME="KEYWORDS" CONTENT="IRC ,chat ,play ,gazoo ,award
,newbie ,HTML ,PSP,Graphic Workshop ,#30andup ,link ,bizarre"
<META NAME="DESCRIPTION" CONTENT="This huge site includes everything from HTML for beginner's, 100's of Sound and Wave links, cartoon links, and FREE Men Sucking Up Apology Postcards... plus much more!"
</HEAD>
As usual I have displayed the tag Attributes in Red, and the Attribute's Value in Green so you can tell which is which, easily.
As you can see in the example, ALL of the <META> Tags are entered between the <HEAD> and </HEAD> Tag set. The order you put them in is not important. Just make sure you have entered at least these two meta tag entries on your page.
THE METATAG ATTRIBUTES:
The Attribute and Value entries work a little bit different in Meta Tags than in other HTML Tags:
NAME=
This Attribute only serves to give the Meta Tag an identifying name. In the example, you will notice I have used two of the most common Names, "KEYWORDS" and "DESCRIPTION".
CONTENT=
All this Attribute does is define what Content is to be associated with the Name you defined in the NAME= portion of the Meta Tag.
So, now, if you look at the example I provided above you can see I have defined my first Meta Tag as the "Keywords" Meta Tag and have included a set of keywords (with a space after each keyword and a comma) as the Content for that individual Meta Tag.
The second Meta Tag I have defined as the "Description" Meta Tag and I have included a short, detailed description of my site's highlights as the Content of that Meta Tag.
OTHER COMMONLY USED METATAGS:
<META NAME="AUTHOR" CONTENT="Your Name Here">
This tag lets you define who wrote your web page. You can use your real name, online name. or the name of your company. For example: "Gazoocifer"
<META NAME="COPYRIGHT" CONTENT="Enter Year And Company Name Here">
This tag allows you to define when your page was created. As the writer of your page you hold the copyright to the material on it. This does not allow you to claim the copyright on other people's works even if they appear on your page.
<META NAME="CONTACT_ADDR" CONTENT="Your Email Address Here">
This tag allows you to define the email address people should use to get in touch with you. For example: "webmaster@gazoo.net".
<META NAME="RATING" CONTENT="Add Your Rating Here">
What audience is your site geared towards? Possible values: "GENERAL", "14 YEARS", "MATURE", or "RESTRICTED".
<META NAME="ROBOT" CONTENT="Enter The Value Here">
Do you want search engines to index other pages on your site? When a search engine spider visits your page it will most likely try to follow your links and index every page it encounters. (Not every search engine will do this but most do) Possible values:
"ALL"
This will tell a search engine spider to follow ALL the links on your web page and index everything it finds.
"NOINDEX"
This will tell a search engine NOT to index this page at all, but it can follow any links on the page.
"NOFOLLOW"
This will tell the search engine spider to index this page, but NOT to follow any links on this page.
"NONE"
This will tell the search engine NOT to index or follow any links on this page.
<META NAME="REVISIT-AFTER" CONTENT="Enter Value Here">
This tag lets you tell a visiting search engine spider when to come back and index the site again.
Possible values can be any amount of time you want: "10 days", "2 months" "1 week" or whatever.
<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=http://www.gazoo.net/example.html">
You can use this tag to set up a redirection to another page. Let's say you have moved a page to another location, or you have the same material on another page (changed the filename) you can send your visitors to a specific page by including this tag.
In the value portion of the CONTENT= attribute put in the number of seconds to pause, followed by a semi-colon, then type URL= and then add the address of the page you want the visitor to go to, just like this:
"2; URL=http://www.gazoo.net/example.html".
In this example, after 2 seconds I would be whisked away to http://www.gazoo.net/example.html.
MORE INFO REGARDING METATAGS:
NOTE: It is important to remember that nothing you put in a Meta Tag is actually displayed on your page!
Not displayed on my page? Then what is the point!?
Well, the point is simply that when you submit your site to a Search Engine, it will come and visit your site.
At some point, it will index your site. When you submit your page to a search engine it sends a little program called a spider to visit your site and gather information about your page from the actual pages on the site. Many of these spiders will follow all of the links on your site to all of your pages so you don't necessarily have to submit every page on your site.
The spider will take certain bits of information from your coding to determine what each page is about, and where and how it should be displayed to a person using the Search Engine. Most Search Engines will use your Meta Tag defined keywords and description to perform this task.
Let's say you have a site about the film Titanic, with movie clips and lots of information available. If a Search Engine spider comes along and finds no Meta tags available, it will try to index the next available text which is usually some sort of welcome message. Unfortunately, "Welcome to my Titanic Page" is not exactly very informative, and the Search Engine will rate your page accordingly. (ie, somewhere near the very bottom of a list 500,000 entries long, usually)
Gazoocifer's note: It is important to make sure that the keywords you use are relevant to your page. It is also VERY BAD to repeat any keyword more than 3 or 4 times. Search Engines will view this as an attempt to SPAM your keywords and probably drop your page altogether from the Search Engine listings. Keep in mind, these are astoundingly sweeping generalizations on my part. Search Engine rules change everyday, but these are basic guidelines that will help you until such a time as you figure out which Search Engine does what.