Advanced Meta Tags
There are two important types of META tags:
- HTTP-EQUIV META tags
- And META NAME tags
META NAME tags are the ones most people first learn about. For example, the description META tag is a META NAME tag because it has the word “name” in the code. Like this:
<META name =”description” content=” Describe this page, what its about, etc. “>
HTTP-EQUIV tags are rarer. The most common one is probably the Content-Type HTTP-EQUIV tag. HTTP-EQUIV tags are displayed in code like this:
<meta http-equiv =”Content-Type” content=” text/html; charset=utf-8“>
The difference between the two is that HTTP-EQUIV META tags define the header of an HTML document. This is a section of code that is sent to your browser before the rest of the page. It communicates to your browser certain introductory information about the page. You can think of it as a “Hello, I am a HTML page. I was born on such-and-such a date and live on such-and-such a server. I was last modified on such-and-such a day, etc…
This introductory information is normally never seen by the end user.
HTTP Header Viewer
HTTP-EQUIV META Tags
Unlike NAME META tags which can be created by anybody, there are a finite number of HTTP-EQUIV META tags. The full list
is boring, and–although a few have been added since–is mostly found in the original HTTP/1.1 specifications. Combined with the list located at the Vancouver Web Pages, there are no additional HTTP-EQUIV tags that we are aware of.
In general, your website’s host takes care of the header for your website’s pages. The server on which your website resides is configured to produce a certain header code with each of your web pages. HTTP-EQUIV tags supplement information already included in a header by your website’s server.
If you create an HTTP-EQUIV tag intended to supercede information provided to a requesting agent by your server, it may or may not work. That is, the requesting agent (such as a browser) may or may not read your header instead of the servers header. This depends on the servers configuration as well as specifications of the requesting agent.
Specifying Content Type and Character Set
The Content-Type tag allows you to specify the media type (i.e. text/html) and the character set. As different languages have different default character sets, this can be important in ensuring that your page displays correctly in all browsers.
The usage is as follows:
<META http-equiv=”content-type” CONTENT=”text/html; charset=utf-8“>
The first parameter after content specifies the media type and the second parameter specifies the character set. A full list of registered document types is available at MIME Media Types. The most common are text/html, text/xml, text/css, and text/plain.
As far as charsets, there are a ton, but the recommended charset is utf-8. The default charset is ISO-8859-1. The full list of character sets is found at IANA.
As content-type is often predefined by your server, you may not be able to override their specifications. However, in order for a document to validate, you will have to include this tag whether or not your server is currently sending the content-type in the document header. If you aren’t sure which charset or document type to choose, choose text/html and utf-8. Attempt to validate it–and they’ll let you know if you messed up.
The content-language META tag is important to directories, search engines or other agents that are looking for websites in a specific language.
The correct usage is as follows:
<META http-equiv=”content-language” content=quot;en“>
In this case, we have listed the language as “en” or English. A full list of official language codes is located at the Library of Congress. Variants are listed and registered at the IANA and include Klingon, Navajo, sign languages, Gaulish and a Liverpudlian dialect known as “Scouse”.
The Expires/Pragma Combination
The Expires and Pragma tags are meant to control browser caching. Theoretically, they will ensure that an end-user
will be viewing a fresh copy of your page and not a copy cached in the History folder of a browser. Netscape seems to obey these META tags more accurately than Internet Explorer.
If you choose to use them, the correct use of these tags is as follows:
<META http-equiv=”expires” content=”Thu, 01 Dec 1994 16:00:00 GMT“>
<META http-equiv=”pragma” content=”no-cache“>
Time for the expires tag should be in format shown above. GMT stands for Greenwich Mean Time and is the time on the Meridian in Greenwich, England. It does not mean that the page will suddenly disappear on that date. Rather, the browser should understand the cached web page is outdated and will renew the cache at this time.
The pragma tag should keep the page from being cached (by browsers, not Google) altogether, but is not always obeyed by browsers.
Refresh Your Page
The refresh META tag is used to refresh a web page every x seconds or to redirect a page to another page in x seconds. For example, the following code would redirect you to our homepage in 3 seconds.
<META http-equiv=”refresh” content=”3;URL=http://www.seopt.com“>
As this is likely to break the back button on the browser, redirecting a page this way is extremely annoying, and is not recommended for good web design. The most common non-annoying use of this tag is to lead a user away from a “splash web page” that is acting as a website intro. Even this, however, should be used with caution.
PICS (Platform Independent Content) Ratings
PICS labels are used by safety filters and certain directories and search engines to categorize sites based on a
variety of factors such as: level of violence, racial tone, commercial content, gambling, sexual material, etc.
Although the PICS tag has been defined by W3C, they have not defined a universal rating system. There are several third party rating systems that will generate PICS labels for your website. The following services offer simple interactive forms that can be filled out (using your own best judgment about the content of your site) to generate PICS META tag.
META NAME Tags
The important META NAME Tags (such as description and robots) were explained in our Introduction to META Data and Meta Tag overview.
Everyone wants that special golden-egg META tag that will rocket them into search engine results like Jack in the Beanstalk. Unfortunately, the fact is, it doesn’t exist. Those obscure META tags you see on rare web pages are obscure for a reason. They aren’t the holy grail of search engine optimization. They’re the tags on the cutting-room floor.
As soon as search engines, HTML editors, and directories realized that they could define META tags, there was a rush to coin new ones–most of which fell heavily by the wayside. Here’s a few you’ve probably seen before:
Leave a Reply
You must be logged in to post a comment