Open In App

HTML DOM Meta httpEquiv Property

The HTML DOM Meta httpEquiv Property is used to set or return the HTTP header for the information in the content attribute. The HTML http-equiv Attribute is used to provide header information or value of the content Attribute. It can be used to simulate an HTTP Header response. 

Syntax:



metaObject.httpEquiv 
metaObject.httpEquiv = HTTP-he 

Property values:

Examples: In this example, we will see the use of DOM Meta httpEquiv Property.






<!DOCTYPE html>
<html>
   
<head>
    <meta http-equiv="refresh"
          content="30">
</head>
   
<body>
    <h1>GeeksForGeeks</h1>
    <h2>DOM Meta http-equiv Property</h2>
    <p>Hello GeeksforGeeks!</p>
    <button onclick="myGeeks()">
        Submit
      </button>
    <p id="sudo"></p>
   
    <script>
        function myGeeks() {
            let x = document.getElementsByTagName(
                    "META")[0].httpEquiv;
            document.getElementById(
                "sudo").innerHTML = x;
        }
    </script>
</body>
   
</html>

Output: 

 

Supported Browsers: The browsers supported by DOM Meta httpEquiv Property are listed below:

Article Tags :