How to redirect to a web page using HTML

In HTML, a meta tag allows you to redirect from one webpage to another. There are some specific attributes which are required by the tag to work accordingly.

Attributes

  • http-equiv: Used to simulate an HTTP response header. To redirect the user to a new page, this will be set to Refresh

  • content: Specifies the following:

    • time interval after which the page is to be refreshed
    • url of the new web-page

Syntax

The general syntax to redirect to another page using HTML is as follows:

<meta http-equiv = "Refresh" content = "0; url = https://www.newURL.com" />
svg viewer

Example

The following code redirects to a new web-page using the meta tag:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Refresh" content="0; url=https://www.educative.io" />
</head>
</html>

Free Resources

Copyright ©2026 Educative, Inc. All rights reserved