So you've mastered the basics of HTML, and now you're ready to sink your teeth into some of the more advanced topics, like those meta tags everyone keeps talking about; just what are they, and what are they used for?
Meta tags are very similar to most other HTML tags, except instead of changing the look of the page in some way, they hide information that can be used by something viewing the page, such as a search engine or web browser. The most common application is to help search engines to understand better what a webpage contains, so we'll cover that first. As you're probably already aware, most search engines aren't very good at figuring out what a webpage is all about; how many times have you searched for something only to find a match that has nothing to do with what you're looking for? Meta tags give you the ability to tell a search engine general ideas, or keywords, that help to better describe the contents of the full page; in this way it can better match people to what they're looking for. For example, say you have a webpage about software that you recommend users download; you could set the keywords for this page to be: software,recommendations,downloads.
So how exactly do you make a meta tag? It's really quite simple; let's take a look at one, and then break it into its respective parts:
<META Name="author" Content="Mark (WebHindsite)">
For most meta tags, you'll need two fields, one called "Name" and another called "Content". "Name" describes what type of information this meta tag contains, while the "Content" contains the actual information; so in the above examples, it's basically saying that the author is Mark (WebHindsite). Now, anything that understands the "author" tag will know that "Mark (WebHindsite)" made this page, pretty simple, eh? Let's take a look at another example:
<META Name="keywords" Content="software,recommendations,downloads">
So what is the above example saying? If I were a search engine, I'd now know that this page has something to do with software, recommendations, and downloads; much easier than reading the entire webpage and trying to guess what it's about!
There is also another field that is sometimes used in meta tags, and that's "http-equiv". This field is a bit complicated, but it basically lets you override an HTTP header that your webserver sends. Say what? I know, it's more than a bit confusing, but let's look at an example:
<META http-equiv="Content-Type" content="text/html">
Now, this example is very similar to the above, except now "Content-Type" is "text/html"; the big difference is that to a web browser (like Internet Explorer), this message looks like it came from the server, and not from the webpage. For more information about this tag, check out the sites referenced below.
Now that we have a grasp of the basic structure of a meta tag, let's look at the most common meta tags: those used to help search engines. The first is the "keywords" name (which you should recognize from above); this tells a search engine words that give a general idea of what a webpage contains. Choosing what keywords you use is crucial if you want people to be able to find your webpage from a search engine... You can find a listing of the Top 100 Internet Keywords on the AnalogX website (in the online section), and also download a program name (aptly) AnalogX Keyword Live, which gathers keywords from various search engines in realtime. Once you have an idea of what people are looking for, go though the list and see which ones best describe your site; here's a good example of the difference this can make:
<META Name="keywords" Content="software,exe,downloads">
and
<META Name="keywords" Content="software,exe,download">
They're the same, right? Wrong! Take a closer look... Notice that it's "downloads" in one, and "download" in the other? Out of 54 million keywords processed using Keyword Live (over a 7 day period), 127213 were for "download", while only 16190 were for "downloads", so which do you think more people will find? This is why it's so important to carefully pick which keywords you use.
The only other meta tag commonly used by search engines is this:
<META Name="description" Content="Free software downloads!">
This field is used by search engines like AltaVista when they list the brief descriptions of what the webpage is about; just a one or two line summary. The key to this tag is that you try to express as much about the page as possible, without using too many words, otherwise they're likely to get cut off.
Now that you know not only what a meta tag is, but how to use it, here are a couple of ground rules you should always use. First, don't just pick keywords that have a high rating but have nothing to do with your webpage; many search engines are wise to this trick, and will block your webpage in the future if they discover you using it. Second, make sure to have a new keyword and description for every page on your site; while it's ok to re-use some of the words, it's important that you don't just cut and paste them onto every page on your site otherwise their effectiveness will be greatly diminished. Finally, it's usually best to put the meta tags in the <HEAD> portion of your webpage, since some search engines only look for them in there.
For more information about Meta tags, check out:
W3C (HTML Spec) AnalogX Keyword Extractor