HTML http-equiv attribute

http-equiv defines pragma directive. It specifies the content type and content language.


<!DOCTYPE html>
 <meta http-equiv="refresh" content="5; html_id_attribute.php"><!--it tells the browser that page should be reloaded after each 100 seconds-->
 <p>All these meta tags given in the head tag are used for search engine optimization(SEO).</p>
Try </>

In the above example, the new page is loaded automatically after 5 seconds. Here new page is html_id_attribute.php

http-equiv attribute values

It is an enumerated attribute. The attribute that has more than one keywords as value is called enumerated attribute.


content-language specifies the default language of the content.

<meta http-equiv="conten-language" content="en">

It indicates that the language of the page is English.

This attribute specifies the language of the page but lang (<html lang="fr">) attribute should be used to represent the type of language.


content-type keyword specifies the type of content.

<meta http-equiv="conten-language" content="text/html">

It represents that the type of content is HTML.


default-style keyword sets the name of the preferred or default style sheet.

<meta http-equiv="default-style" content="defaultfile.css">

The above example sets a preferred style sheet to design the layout of a page.


refresh keyword reloads the page after some seconds. It is a time redirect.

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

In the above example, the page reloads after each 10 seconds.

Related Tags

meta tag supports http-equiv attribute. It describes the meta data of the page. The search engines use the meta data to index the pages.

Was this article helpful?




Get the newsletter