Computer >> Computer tutorials >  >> Programming >> HTML

How to redirect URL to the different website after few seconds?


Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.

To redirect URL to a different website after few seconds, use the META tag, with the content attribute. The attributes set the seconds.

How to redirect URL to the different website after few seconds?

The following is an example of redirecting current page to another website in 10 seconds. The content attribute sets the seconds.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Meta Tag</title>
      <meta http-equiv = "refresh" content = "10; url = https://www.tutorialspoint.com" />
   </head>
   
   <body>
      <p>Hello HTML5!</p>
   </body>
</html>