This article has been updated and combined into a newer article, found here: On-Page Search Engine Optimization Techniques. We are keeping this older one up for archival purposes only.
Meta tags are tags that exist in the head section of an HTML page. They fulfill a variety of purposes but two tags in particular, keywords and description, were created specifically to help search engine indexing.
When they were initially introduced they were widely popular and solved a lot of existing problems with search engine indexes (they didn't have very good software back then). People devoted a large portion of their time and money on researching these meta tags and trying to figure out how best to use them with the various search engines. In fact if you had a website back then you may have even bought a book that went into depth on the subject. If you did buy such a book, it might pain you to know that its now all but worthless.
You see people started to abuse meta tags to misrepresent the content of their pages. People would fill them with phrases from popular culture to try to get as much traffic as possible, even if their site had nothing to do with these phrases. This caused search engines to phase out meta tags so that today they are hardly used, if at all, in determining under which term or in what position your site appears in the search results. In fact only two major search engines, Inktomi and Teoma, still uses the meta keywords tag at all, and it would not surprise me if they dropped it in the near future. To verify if a particular engine using the meta keywords tag use their advanced search feature to search for a word found only in your meta keywords tag, and then limit the results to your domain only. If any results come up, the engine uses the keywords tag, if not, it doesn't.
You should still use meta tags however, simply because they are easy to implement and can't hurt. Just don't worry about spending too much time on them.
Lets start with the keywords tag. The tag needs to be placed inside thetags of your HTML document and should look as follows:
You may hear conflicting advice about how to list your keywords, some will say don't use commas, others will say repeat each word three, six, or ten times, but never more than that number. Such talk is generally left over speculation from the times when people spent significant amount of time researching this tag. The official documentation says to separate the keywords with commas, so I recommend you do that, and if you want to list a phrase you should do so as I outlined above. As for repetition, I recommend you only list each keyword once. Nowadays search engines are very sophisticated and simply repeating a keyword isn't going to help, they'll simply ignore the repetitions if they're even looking at the keywords at all, which most don't.
The description tag is the other meta tag we are interested in. Like the keyword tag it also needs to be placed inside thetags of your HTML document, in fact they're usually placed side by side. The description tag should look as follows:
The description tag is different in that it still is very important, but not because of spiders, because of people. Some search engines still use the information in the description tag to display under your title in their search results (even if they don't use it to rank your site). So what you need to do is write a description that grabs the attention of the people doing the search, but be realistic about it. People aren't stupid, they've grown adept at dealing with spam and misrepresentation on the Internet. If you put "FREE! FREE! FREE!" as your description people won't click on it, if you need so much hype they'll think you're illegitimate and move on. So use proper punctuation and write a good comprehensive description that lets the user know you're serious and professional about what you offer. Think about what people are searching for when they run into a listing for your site and put that in your description. Also don't waste space repeating the title in the description, the title will be shown directly above the description in the listings so you're wasting valuable space.