Meta Elements: A Field Guide

Metadata, in its simplest form, is information about data. In this tutorial, we are going to look at the HTML and XHMTL elements known as Meta Elements and learn to use them. Not all are still used by search engines to determine rank, but they still have their purpose, and that is what this article is all about.

The word meta is derived from Greek, and means "after." James Ferrier, Scottish God of Philosophy (aka unemployed) and coiner of the word "epistemology," would have you know that it also means "about itself." In other words, meta tags are really narcissistic, willing at any moment to give you information about their favorite topic: themselves.

Meta tags are placed in the <head> section of your HTML/XHTML documents and are used to give information such as keywords, a description of the page, the language in which the page is written (i.e.; English, German, Gorilla), expiration date of the page, what type of content — in short, information about the data within the page.

Meta elements offer four valid attributes, and we will go through all of them below.

Back in the wonder years of the Internet, Ghosts of Search Engines past (i.e.; Infoseek, AltaVista, and Bob Cratchett), used the keywords attribute to help index websites. Budding search engine optimizers however, used it to to trick search engines and gain rank. It took a while, but the Ghost Engines that haunted the searchways of the Internet finally caught on and today none of the major search engines give them much, if any, consideration at all.

It is probably still good practice, however, to use the attribute, so long as you steer away from the black hat methods of keyword stuffing and trying to fool the search engine gods, because you never know when things may change. Maybe some new hot shot algorithm will pop its head up, able to determine who is faking their keyword meta-tag and who isn’t, and then where will you be?

Here is an example of our buddy the keywords meta-tag:

<meta name="keywords" content="seochat, search engine optimization, tutorial"/>


Websites are written in a programming language, as you well know, but that language has nothing to do with the language attribute. Its purpose really is to let search engines know in what natural language your web page content is written. For example, if you have a blog where you write French poetry, you should go ahead and put up a white flag and surrender now. You have failed at life. In addition, you would want to add a two letter abbreviation to your language attribute signifying that it is, indeed, in Francois.

Here is an example of it in use:

<meta http-equiv="Content-Language" content="FR">

That tells the search engines two things: 1) That your content is written in French and 2) That you are a cheese-eating, French fry-hating, dry-humor having, surrender monkey. [But at least your mother probably doesn't smell of elderberries. --Ed.]

Below you will find a nifty table with a bunch of language codes, should you ever find yourself suddenly multi-lingual and in need:


Abbreviation

Language

BG

Bulgarian

CS

Czech

DA

Danish

DE

German

EL

Greek

EN

English

EN-GB

English-Great Britain (God Save the Queen!)

EN-US

English (United States)

ES

Spanish

ES-ES

Spanish (Spain)

FI

Finnish

FR

French 

FR-CA

French (Quebec)

FR-FR

French (France)

HR

Croatian

IT

Italian

JA

Japanese

KO

Korean

NL

Dutch

NO

Norwegian

PL

Polish

PT

Portuguese

RU

Russian

SV

Swedish

ZH

Chinese


This handy little fellow, unlike its cousin the keyword attribute, is still supported by the majority of the big search engines. Google uses it as a fallback when someone wishes to use the "related: query" to find out information about a given page.

The description attribute is used to describe a page’s content. Search engines take this description and display it on their result pages when users search for certain terms. Typically you will want to limit your description to less than 200 characters and always remember that the majority of the time, this text is what the user will use to decide if they want to visit your site.

Here is a sample of how you would write a description of the page:


<html>

<head>

<meta name="description" content="Tutorials on Search Engine Optimization by the best writer in the world, James Payne">

</head>

<body>

</body>

</html>

 


Meta Element: Robots Attribute

Not the same, and not as effective as the robots.txt file (also known as the Robots Exclusion Standard), the robots attribute is used to try to control whether or not a spider can crawl your page to index it. It is also used to try to block the spiders from following links from a page or not. Sometimes you might want to link to a page on someone else’s website for instance, but not want to give them any "link juice."

A few of the values an attribute can have are as follows:


  • Noindex – stops a page from being indexed

  • Nofollow – stops a link from being crawled

  • Noarchive – stops an engine from storing a cached copy of your page

  • Nosnippet – stops Google from showing a description under your search engine listing and not show a cached link in the results either


Google, Yahoo, and MSN sometimes use titles and abstracts from the Open Directory Project (also known as ODP) for titles and descriptions when returning a results page. To stop this from occurring, the three companies began using "NOODP" as a new value for the robots meta tag element. Below is how you would write the code:

<Meta Name="Robots" Content="NOODP">

If you would like to block this from happening on just one of the sites, you could use one of the following codes:

Google:

<Meta Name="GOOGLEBOT" Content="NOODP">

MSN and Live Search:

<Meta Name="msnbot" Content="NOODP">

Yahoo:

<Meta Name="Slurp" Content="NOODP">

In addition, Yahoo has been known to use its own Yahoo Directory content next to the ODP data. To stop this, simply use these tags:

<Meta Name="ROBOTS" Content="NOYDIR">

<Meta Name="Slurp" Content="NOYDIR">

And finally, Robots-NoContent is a new attribute and value created by Yahoo in May of 2007 that tells the Yahoo engine to ignore and not index the content in a given tag. For instance, if you have a paragraph you do not want to be indexed, you can do so in the following manner:

<p class="robots-nocontent"> We attack tonight muahahaha! </P>

Note that this simply means Yahoo will not index that specific paragraph; other search engines will simply laugh at you and put all your well laid plans in plain view.

Conclusion

This is by no means a complete list of meta elements. For instance, we did not cover meta-refresh here or the <meta http-equiv="Content-Type" content="text/html"/> (I will, however, cover that in a later article). But these are the basics, and the majority that you will encounter. Thanks for reading and look for more to come!

Till then…

Google+ Comments

Google+ Comments