Saturday, July 2, 2011

HTML Meta Tags

Meta tags allow you to provide metadata about your HTML pages. This can be very useful for search engines and can assist the "findability" of the information on your website.

The HTML meta Element


Metadata is information about data.

The <*meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.

Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.

The <*meta> tag always goes inside the head element.

The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.

What is Metadata?

Metadata is information about, or that describes, other data or information.

If we relate this to a web page, if you think about it for a moment, you could probably come up with a lot more information about a web page than what you're actually displaying to the reader. For example, there could be a number of keywords that are related to the page. You could probably give the page a description. The page also has an author - right? All these could be examples of metadata.

Metadata on the Web

Metadata is a very important part of the web. It can assist search engines in finding the best match when a user performs a search. Search engines will often look at any metadata attached to a page - especially keywords - and rank it higher than another page with less relevant metadata, or with no metadata at all.

Adding Meta Tags to Your Documents

You can add metadata to your web pages by placing <*meta> tags between the <*head> and <*/head> tags. The can include the following attributes:






















AttributeDescription
NameName for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.
contentSpecifies the property's value.
schemeSpecifies a scheme to use to interpret the property's value (as declared in the content attribute).
http-equivUsed for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.


Example HTML Code:


Keywords:
<*meta name="keywords" content="HTML, meta tags, metadata" />
PLEASE Remove Firstly All Asterics *




Description:
<*meta name="description" content="Contains info about meta tags" />
PLEASE Remove Firstly All Asterics *




Revision date (last time the document was updated):
<*meta name="revised" content="Quackit, 6/12/2002" />
PLEASE Remove Firstly All Asterics *




Refresh the page every 10 seconds:
<*meta http-equiv="refresh" content="10" />
PLEASE Remove Firstly All Asterics *



THANK YOU