Metadata is simply, information about data. In HTML documents, the <meta> element provides information to browsers about the HTML document. Metadata information will not be displayed on the page, but will used by the
web browser in some form or fashion. Meta elements are used for various reasons such as adding, keywords, a page description, author of the document, when it was last modified, and other related information. The <meta> element
is always placed within the head element as shown here:
<title>My Web Page Title</title>
<meta name="description" content="a short description about this web page." />
<meta name="keywords" content="important words or phrases found on this page." />
Here are some of the more common meta elements you'll be including in your HTML document. There are many more, and you can define your own in a schema.
This tag is used to add copyright information to your page.
<meta name="copyright" content="Copyright © 2012, ITGEARED.com ">
Search engines sometimes choose to use description to show them with the results of searches. Having a description will help your users have a better understanding about the page so they would be more likely to click on your link.
<meta name="description" content="This web page is about science, technology, and education.">
The generator tag is not required, but if you use a web publishing application, the application itself may add this tag to your document.
<meta name="generator" content="My Web Publishing App ">
This attribute informs the Google search engine about indexing, archiving and link-following rules.
- noarchive - Prevents Google search engine from archiving the page.
- nofollow - Informs Google that the page can be indexed, but links should not be followed.
- noindex - Google robots should follow links, but not index the page.
- nosnippet - Prevent Google search engine from saving snippets and archiving the document.
<meta name="googlebot" content="noindex">
Keywords tell the web crawler what the main focus is of the document. It can be used by search engines, although many search engines stopped using keywords with regard to indexing your pages.
<meta name="keywords" content="technology, science, education">
The web page will display for a specified amount of time before refreshing or switch to a new URL. Note: for redirecting pages, it is preferable to use a URL rewriting method. Using this meta attribute requires the
browser to support it. It may not work for all of your visitors.
<meta name="refresh" content="10; url=http://www.itgeared.com"> [OR]
<meta http-equiv="refresh" content="10; url=http://www.itgeared.com">
<title>Web Page Title</title>
<meta http-equiv="refresh" content="0;URL='http://anotherhost.example.com/'" />
<p>This page has moved to a <a href="http://anotherhost.example.com/">
This tag is not required, but can be used if you want to instruct web spiders on how to, or not to crawl your site. Valid values for the "CONTENT" attribute are: "INDEX", "NOINDEX", "FOLLOW", "NOFOLLOW". Multiple comma-separated values are allowed, but obviously only some combinations make sense.
If there is no robots <meta>tag, the default is "INDEX,FOLLOW", so there's no need to use this tag if that is your intention. Other possibilities include:
- <meta name="ROBOTS" contnet="NOINDEX, FOLLOW">
- <meta name="ROBOTS" contnet="INDEX, NOFOLLOW">
- <meta name="ROBOTS" contnet="NOINDEX, NOFOLLOW">
Fore more detailed information about meta and additional attributes, please vist W3.org's page concerning this topic.
Recommended Books & Training Resources