HTML <meta> with http-equiv Attribute

You are Here:

HTML <meta> with http-equiv Attribute

The http-equiv attribute specifies the name of a HTTP header.

Reload

The following example allows you to reload the page after 5 seconds.

Example

HTML Online Editor
<!DOCTYPE html> <html> <head> <meta http-equiv="refresh" content="5"> </head> <body> <p>Wait for 5 seconds to refresh this page.</p> </body> </html>

Attribute Value

ValueExplanation
content-security-policyAllows page authors to define a content policy for the current page which help guard against Cross-Site Scripting attack otherwise called as XSS attack.
refresh
  • Wait for seconds mentioned in content attribute and then reload the page. Works only when content attribute contains a positive integer.
  • Wait for seconds mentioned in content attribute and then redirect to another web page. Works only when content attribute contains a positive integer followed by the string ';url=', and a valid URL.

Redirection

The following example allows you to redirect the page to another specified page after 5 seconds.

Example

HTML Online Editor
<!DOCTYPE html> <html> <head> <meta http-equiv="refresh" content="5;url=/css"> </head> <body> <p>Wait for 5 seconds to start learing CSS.</p> </body> </html>

Content-Security-Policy

The following example will load resources (images, fonts, scripts, etc.) if any, only over https.

Example

HTML Online Editor
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Security-Policy" content="default-src https:"> </head> <body> <p>Wait for 5 seconds to start learing CSS.</p> </body> </html>

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author