Introduction:
Meta
tags are used to store information usually relevant to browsers and search
engines. For example, some search engines look to meta tags for descriptions,
keywords, etc. Other
examples have relevance to the browser: Examples would be tags telling it to
load a specific url after x seconds or tags telling it that a certain page
should not be cached.
Another
example is the ICRA meta tag. This tag can prevent sites with adult content
from being seen on IE browsers. Finally, some meta tags serve a purpose that is unique for the site
in question. An example might be a newspaper site, where the journalist sends a
text of an article to an advanced tool that creates an HTML document of it.
This program may add special meta tags to allow an indexing of the articles. So
if you ever see a strange meta tag that is not listed the books, this is
probably the reason. The
next page will explain why meta tags relevance to search engines is over
rated...
Adding Meta Tags to Your Documents:
You can add
metadata to your web pages by placing <meta> tags between the
<head> and </head> tags. The can include the following attributes:
Attribute
|
Description
|
Name
|
Name for the property. Can be anything. Examples include,
keywords, description, author, revised, generator etc.
|
content
|
Specifies the property's value.
|
Scheme
|
Specifies a scheme to use to interpret the property's
value (as declared in the content attribute).
|
http-equiv
|
Used for http response message headers. For example
http-equiv can be used to refresh the page or to set a cookie. Values include
content-type, expires, refresh and set-cookie.
|
The myth:
It is a myth among web designers that with the right meta tags you can make it to the top on all search engines. The truth is close to being the opposite. With the wrong meta tags you can make it to the bottom, but meta tags alone do not take you to the top anywhere.
The abuse: Two meta tags have special relevance for search engines: Description andKeywords.
When search engines first started to look for these meta tags, the intention was that web designers could emphasize what the pages were about. For example, a scientific page about the surface of the moon might not have the word "moon" on it, although the page definately related to the topic "moon".
Creative minds didn't take long to find out that this could be an excellent tool for improving search rankings. Many webmasters included keywords and descriptions that held no relevance to their page.
The strike back: After some time, the meta tags did not serve the purpose they were intended for. Most were being used for spamming. Therefore, some search engines, such as Excite, stopped looking at them entirely.
Other search engines, such as Infoseek, directed the spammers weapons back at them. They simply ranked sites lower if the meta tags included words that were not present in the content of the page.
Document Description:
<META name="DESCRIPTION" content="AN HTML
Tutorial">
Most
search engines will display the description when they list results from a
search. If you do not include this tag, then the
engine will simply list the first words on the page - which is not always very
meaningful.
Specifying Keywords:
<META name="KEYWORDS" content="html,
webdesign, javascript">
This
meta tag was intended to be used for keywords with special relevance for the
page. But because of misuse, many engines skip
them. Others use them as an indicator of whether a page is spam or not. The few that use them to indicate what the page is really about, do
not value them as much as they used to.
Setting Author Name:
You can set an
author name in a web page using Meta Tag. See an example below:
<head>
<meta
name="author" content="Belal hossain" />
</head>
If you do not
include the expiration date and time, the cookie is considered a session cookie
and will be deleted when the user exits the browser.
Autoload pages:
You
can use the refresh meta tag to automatically load a page after x seconds.
<META http-equiv="REFRESH" content="5;
url=http://www.alherabd.com. ">
In
the example www.
alherabd.com is loaded after 5 seconds.
Document Refreshing:
You can specify a
duration after which your web page will keep refreshing. If you want your page
keep refreshing after every 10 seconds then use the following syntax.
<head>
<meta http-equiv="refresh" content="10" />
</head>
Redirect
to new domain:
The most common use of the REFRESH meta tag is for redirection. Typically when a site changes the domain name.
If you take a site down from the old domain - people who go to there from bookmarks will get an: Error 404 - File Not Found.
Instead you should place a page on the old domain saying something like "This site has moved. Please wait and you will be taken to the new domain. Remember to update your bookmarks."
If you keep this page on the old domain for a few months you will not loose the visitors that already have your site bookmarked with the old domain name.
The most common use of the REFRESH meta tag is for redirection. Typically when a site changes the domain name.
If you take a site down from the old domain - people who go to there from bookmarks will get an: Error 404 - File Not Found.
Instead you should place a page on the old domain saying something like "This site has moved. Please wait and you will be taken to the new domain. Remember to update your bookmarks."
If you keep this page on the old domain for a few months you will not loose the visitors that already have your site bookmarked with the old domain name.
Intro sequence of pages:
Another more creative use of the REFRESH tag is a fancy intro to a site.
Say, you wanted the page to write "Welcome", then after 1 second, "Get Ready!", and after one more second it should say "For A Special Experience". Finally, after a few seconds the real page would be loaded.
This could be achieved by creating 3 pages with a refresh tag on them. The first page would load the second page after 1 second, which in turn would have a refresh tag that loads the third page after 1 more second.
Document Revision date:
This information
tells about last time the document was updated.
<head>
<meta
name="revised" content="alherabd, 6/12/2006" />
</head>
Setting Cookies:
You can use Meta
Tag to store cookies on client side later information can be used by then Web
Server to track a site visitor.
<head>
<meta
http-equiv="cookie" content="userid=xyz;
expires=Wednesday, 08-Aug-00 23:59:59
GMT; />
</head>
If you do not
include the expiration date and time, the cookie is considered a session cookie
and will be deleted when the user exits the browser.
Other tags:
Many HTML
editors create a meta tag telling which program was used for the page.
<META name="GENERATOR" content="Frontpage
3.0">
The
conclusion:
- Use meta tags with care.
- Do not include words that are not present on your pages.
- Do not repeat words.
- Use the meta tags the way they were intended, because the search engines are well aware that meta tags are an excellent filter for spam sites.
No comments:
Post a Comment