Saturday, October 9, 2010

HTML Meta Tags

HTML meta tags used in head section of HTML document.HTML metadata lets you specify information about a document rather than document content in

a variety of ways. the meta element can be used to include name of the author, description of the page, keywords,etc..

the <meta> tag is an empty element and so does not have a closing tag, rather,<meta> tags carry information within attributes, so you need a

forward slash character at the end of the element.

meta tag is a very imprortant part of the web. meta tags can assist search engines (Google, Yahoo, Bing,etc....) in finding the best match when a

user performs a search. search engines will often look at metadata included on web page. search engines gives rank to your web depends which keywords you're using. search engines rank it higher than another page with less relevant metadata, or with no metadata at all.

some of examples of meta tags:
you can add metadata to your web page by placing <meta> tags between head section of the document.(between <head>....</head>)
meta tags can include the following attributes:

1) Name : name of the property. it can by anything keywords, author, description, etc.....
2) content : content specifies web page value.
3) http-equiv : Used 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, refresh, expires and set-cookie.

let's see some important usage of meta tags:
Defining keywords:
we specify keywords which will be used by the search engine to search a web pgae. using of keywords is so important to your web page.
by using keywords search engine gives rank to your web site.
by using following tag, you can specify important keywords related to your web page.
<meta name="keywords" content="learn html,metadata,markup tutorial" />

Document Description:
Document Description is again important information & many search engine use this information as well while searching a web page. so it is important you should give an appropriate  description of the page.
<meta name="description" content="Learn about HTML." />

Setting Author Name:
You can set an author name in a web page using Meta Tag. See an example below:
<meta name="author" content="Abhishek" />

Page Redirection:
You can specify a page redirection using Meta Tag. Following is an example of redirecting current page to another page. You can specify a duration after which page will be redirected.
<meta http-equiv="refresh"
         content="5; url=" />

Document Refreshing:
You can specify a duration after which your web page will keep refreshing. If you want your page keep refreshing after every 5 seconds then use the following syntax.
<meta http-equiv="refresh" content="5" />

No comments:

Post a Comment