Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

How to make a HTML link that forces refresh ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In this article, we will learn to make an HTML link that forces refresh. HTML <meta> http-equiv attribute with refresh value specified in meta element is used to refresh website pages.

Refresh instruction specifies time interval for the page to reload itself, with its value mentioned in content attribute as a positive integer. Positive integer is the number of seconds after which the page will refresh itself. 

Syntax:

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

Example: In this example, we will add a refresh property to the meta tag which refreshes the web page.

HTML




<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="refresh" content="5" />
</head>
<body>
    <h2 style="color: green">
        Welcome To GFG
    </h2>
    <p>
        This page automatically refreshes
        after every 5 seconds
    </p>
</body>
</html>


Output:

My Personal Notes arrow_drop_up
Last Updated : 15 May, 2023
Like Article
Save Article
Similar Reads
Related Tutorials