HTML http-equiv attribute

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

<head>
 <meta http-equiv="refresh" content="5; html_id_attribute.php"><!--it tells the browser that page should be reloaded after each 100 seconds-->
</head>
</>

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

Attribute values

All possible values of http-equiv attribute

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

http-equiv='content-language'

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.

http-equiv='content-type'

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.

http-equiv='default-style'

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

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

http-equiv='refresh'

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

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

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



Was this article helpful?