<!DOCTYPE html>
<html>
<head>
<title>Meta Refresh Example</title>
<meta http-equiv="refresh" content="5;url=http://www.PuStudy.Com/html-tags/meta_refresh_example.html">
</head>
<body>
<p>Watch me redirect to another page in 5 seconds...</p>
</body>
</html>
The above example demonstrates usage of the <meta>
element.
The <meta>
element represents metadata in an HTML document. More specifically, metadata that cannot be expressed using the <title>
, <base>
, <link>
, <style>
, and <script>
elements.
Metadata can include document decription, keywords, author etc. It can also be used to refresh the page or set cookies.
If you use the <meta>
element, it must contain one (but no more) of the name
, http-equiv
, or charset
attributes.
If either name
or http-equiv
is specified, then the content
attribute must also be specified. Otherwise, it must be omitted.
The content
attribute gives the value of the document metadata or pragma directive when the element is used for those purposes. The allowed values depend on the exact context, as described in subsequent sections of this specification.
name
AttributeStandard values for the name
attribute include the following:
application-name
metadata name must not be used. There must not be more than one meta element with its name attribute set to the value application-name
per document. Browsers/user agents may use the application name in UI in preference to the page's title, since the title might include status messages and the like relevant to the status of the page at a particular moment in time instead of just being the name of the application.meta
element with its name
attribute set to the value description
per document.http-equiv
AttributePossible values for the http-equiv
include:
content-language
content-type
default-style
refresh