previous | start | next

META

<META
CHARSET=
charset
CONTENT=description
HTTP-EQUIV=response
NAME=description
URL=url>

Provides information about an HTML document to browsers, search engines, and other applications. For instance, META HTTP-EQUIV=REFRESH CONTENT=2 reloads a document every two seconds. Setting the HTTP-EQUIV= attribute to REFRESH gives the instruction to reload. The CONTENT= attribute specifies the time in seconds that the page refreshes. You can specify any URL in the element. If no URL is specified, the current document is reloaded.

CHARSET=charset
Describes the character set to be used with the document. The preferred usage is the HTTP-EQUIV= attribute.
CONTENT=description
Defines the meta-information content to be associated with the given name or HTTP response header. Can be used with the URL= attribute and a date and time specification to reload a document at a specified interval. See the Client Pull section in the Author's Guide or the examples that follow.
HTTP-EQUIV=response
Binds the element to an HTTP response header. This information is then used based on the application reading the header (examples follow). This attribute is the preferred usage for describing a character set.
NAME=description
Contains a description of the document.
URL=url
Indicates the document's URL.

Examples

If the document contains:

<META HTTP-EQUIV="Expires"
      CONTENT="Tue, 04 Dec 1996 21:29:02 GMT">
<meta http-equiv="Keywords" CONTENT="HTML, Reference">
<META HTTP-EQUIV="Reply-to"
      content="anybody@microsoft.com">
<Meta Http-equiv="Keywords" CONTENT="HTML Reference Guide">

then the server would include the following header fields:

Expires: Tue, 04 Dec 1996 21:29:02 GMT

Keywords: HTML, Reference

Reply-to: anybody@microsoft.com

as part of the HTTP response to a GET or HEAD request for that document.

The following example shows the correct usage for describing a character set. For more information, see the Character Sets section in the Author's Guide.

<META HTTP-EQUIV="Content-Type" 
  CONTENT="text/html; charset=Windows-1251"> 
<HTML>
<HEAD>
<META HTTP-EQUIV="REFRESH" CONTENT=2>
<TITLE>Reload Document</TITLE>
</HEAD> 
<BODY> 
<P>This document will be reloaded every two seconds.
</BODY>
</HTML>

<HTML>
<HEAD>
<META HTTP-EQUIV="REFRESH" CONTENT="5; URL=http://www.sample.com/next.htm"> 
<TITLE>Load Next Document</TITLE>
</HEAD> 
<BODY> 
<P>After five seconds have elapsed, the document 
"http://www.sample.com/next.htm" will be loaded.
</BODY>
</HTML>


previous | start | next

Comments:

See also: