html tutorial - http-equiv Attribute in HTML - html5 - html code - html form




Http equiv attribute in html

Learn html - html tutorial - Http equiv attribute in html - html examples - html programs

  • The http-equiv attribute is used to specify the HTTP header for the information of the content attribute.
  • The http-equiv attribute can be used to simulate HTTP response header.

Syntax for http-equiv attribute :

<meta http-equiv="value">

Applies to:

Element Attribute
<meta> http-equiv

Attributes values for http-equiv attribute:

Value Description
content-type Specifies the character encoding for the document.
default-style Specified the preferred style sheet to use.
refresh Defines a time interval for the document to refresh itself.

Sample coding for http-equiv attribute :

Tryit<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy http-equiv attribute</title>
        <meta http-equiv=”refresh” content=”30”>
    </head>
    <body>
        <p>Welcome to Wikitechy!</p>
    </body>
</html>

Code Explanation for http-equiv attribute:

http-equiv Attribute Code Explanation

  1. http-equiv attribute used provide HTTP header information for content attribute.
  2. refresh value is used to refresh the page.

Sample Output :

http-equiv Attribute Output

  1. The page automatically refresh every 30 seconds.

Browser Support for http-equiv attribute in HTML :

Yes Yes Yes Yes Yes

Related Searches to http-equiv Attribute in html