TECHNOLOGY
How to Redirect to Another Page in HTML?
Redirecting to Another Page in HTML
Discover how to redirect to another page in HTML and get the top 4 best ways to redirect to another page in HTML to consider using in your website.
Wheather you’ve changed your website domain (URL) or a specific webpage has been relocated, you can use the following 4 best ways to redirect the users to another page in HTML:
1) Redirect to Another Page in HTML – Option #01
<!DOCTYPE html>
<html>
<head>
<title>HTML Meta Tag</title>
<meta http-equiv = “refresh” content = “2; url = https://www.tutorialspoint.com” />
</head>
<body>
<p>Hello HTML5!</p>
</body>
</html>
2) Redirect to Another Page in HTML – Option #02
<meta http-equiv=”Refresh” content=”0; url=https://www.w3docs.com” />
3) Redirect to Another Page in HTML – Option #03
<!DOCTYPE HTML>
<html lang=”en-US”>
<head>
<meta charset=”UTF-8″>
<meta http-equiv=”refresh” content=”0; url=http://example.com”>
<script type=”text/javascript”>
window.location.href = “http://example.com”
</script>
<title>Page Redirection</title>
</head>
<body>
<!– Note: don’t tell people to `click` the link, just tell them that it is a link. –>
If you are not redirected automatically, follow this <a href=’http://example.com’>link to example</a>.
</body>
</html>
4) Redirect to Another Page in HTML – Option #04
<!– [time] is the time to redirect. For immediate loading, you can set it to 0 –>
<meta http-equiv = “refresh” content = ” time ; url = link”/>
How to Redirect to Another Page Using HTML?