Redirect a page to another website using HTML

Meta tag http-equiv refresh is used to tell the browser to refresh or reload the page, and is usually placed in the <head> seaction of an HTML document.

<meta http-equiv="refresh" content="5"/>

The option content defines the time in second of how long should the browser wait to reload the page.

To redirect to another site, the option content need to slightly be changed to include the URL it is to be redirected to and as in the following example, will immediately redirect to https://www.simplified.guide

<meta http-equiv="refresh" content="0;url=https://www.simplified.guide"/>

Sign up for Build Responsive Real World Websites with HTML5 and CSS3 and many other great courses on Udemy to learn more.


Written by Mohd Shakir Zakaria. Last updated on 2019-02-12