Blog

HTML Trick With Meta Tag

Oct 22nd, 2009 - 0 comments

Meta is a Latin word that means ‘with’. However, they are used to provide information about the Document itself. This type of information is relevant mostly to the Browser and not much to the user of that web-page.

Meta tag contains information and data that is of use to the Browser and/or the Search Engines. It basically contains information about the contents of the Document.

Here, I will demonstrate a HTML Trick with Meta tags in which the web-page will automatically load up another web-page and take the user to that web-page without any input from the user’s side, like a click or prompt. Another interesting thing about this trick is that, we can load the next page after a pre-determined interval that is decided by the coder and can be varied as the need arises.

<head>

<meta http-equiv=refresh content=”5;url=http://www.nextpage.com> </head>

Meta tags are always placed inside the head tags. And they don’t need a corresponding closing tag.

In the code, HTTP stands for Hyper Text Transfer Protocol. Hence, HTTP refers to the rules and regulations to be followed by the Browser while transferring data with the web-server.

Here the keyword ‘refresh’ makes the browser automatically refresh itself after a specified number of seconds, which is ‘5’ in the above example. Since, here we have also mentioned an URL here in the code, so the browser will load that particular page (http://www.nextpage.com in the above example) instead of refreshing the originally open web-page.

It will open the URL mentioned on its own, i.e. without any type of input by the user.

Comments



New Comment

Your Name:
Your Email:
Comment Body:
 
Captcha:
 

About

Welcome to the SnobbySlice blog! Here we post design and developer-centric tutorials, articles, and giveaways. Read up and comment on some of our great content!