How to use Meta Tag to redirect an HTML page?

URL redirection, also called URL forwarding is a way to send users to a different URL from the one they originally requested. The three most commonly used redirects are 301, 302, and Meta Refresh.
Meta Refresh Redirect is a client-side redirect. Unlike 301 and 302 redirects that happen on the webserver, Meta Refresh Redirect takes place in a web browser and instructs the web browser to go to a different web page after a specified time span.
The use of Meta Refresh Redirect is deprecated or in other words, disapproved by W3C(World Wide Web Consortium), since it is a non-standard procedure of redirection, it disorients users, and it can also disrupt a browser’s history of visited pages.

Syntax:

<meta http-equiv = "refresh" content = "20; url = https://ide.geeksforgeeks.org"/>

Example:



filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>Meta Refresh Redirection</title>
    <meta http-equiv="refresh" 
          content="20; url = https://ide.geeksforgeeks.org" />
</head>
  
<body>
    <h1 style="text-align:center;color:green;">
      GeeksforGeeks
  </h1>
    <p style="text-align:center;"
      If your browser supports Refresh,
      you'll be redirected to GeeksforGeeks 
      IDE, in 20 seconds. </p>
</body>
  
</html>

chevron_right


Output:
Before:
output
After:



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



Improved By : shubhamr238