Contact Our Development Team
Free Code Tutorials & Open Source Code
HTML Meta Tags
Tutorials > HTML > Meta Tags
Meta Tags
Meta tags are used to supply information about your website which is not visible to people (unless they view your source code), but is visible to non-human visitors such as search engine spiders. They also have a number of other uses, for example Google ask you to add a meta tag to the top of your pages when verifying your domain for use with Google Webmaster tools. Almost all meta tags take the same form: <meta name="name" content="content" />. Below are a few example of the most common meta tags. All meta tags should appear between the <head> and </head> within your code.
<head>
<meta name="keywords" content="keyword, key words, keywords" />
</head>
The meta tag keywords is used to indicate keywords that relate to your site. Don't be tempted to stuff your keywords meta tag with keywords which aren't relevant to your page: search engines are very good at detecting this and ignoring it, and may even give you a penalty in their search engine rankings for doing so. We'll discuss this topic further in the SEO Tutorial section.
<head>
<meta name="description" content="the description for your page" />
</head>
The description meta tag is useful as Google often uses it to display the text which appears under your search result.
<head>
<meta name="revised" content="28/09/2009">
</head>
Indicates when the page was last changed. The revised meta tag doesn't seem to be used very frequently but can be a useful addition if you often change content on a page.
Refresh and redirect with meta
You can use meta tags to refresh pages, and redirect visitors to other pages. This can be used where refreshing and redirecting with JavaScript or by setting headers in a scripting language is not possible.
<head>
<meta http-equiv="refresh" content="5; http://www.openzu.com" />
</head>
This example code will redirect the visitor to http://www.openzu.com every 5 seconds. If you placed the code in the page at http://www.openzu.com it would refresh every 5 seconds. If you placed it on a different page, it would redirect to that page after 5 seconds. We'll looks at alternative ways of refreshing and redirecting later on, but if you need to do it now you can use this meta tag.
Page Responses
Currently there have been no responses to this page...
If you have anything to contribute to this tutorial, found a bug, or know a better way of achieving the same goal, please leave your response below.
     
Copyright ©2009, Wired IDS Ltd. | Licensed under Creative Commons Attribution Share-Alike | Load time: 0.305 seconds