HTML <meta> Tag
<!DOCTYPE html> <html> <head> <title>Meta Refresh Example</title> <meta http-equiv="refresh" content="5;url=http://www.htmlcodes.ws/html-tags/meta_refresh_example.cfm"> </head> <body> <p>Watch me redirect to another page in 5 seconds...</p> </body> </html>
The above example demonstrates usage of the
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
http-equiv is specified, then the
content attribute must also be specified. Otherwise, it must be omitted.
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.
Values for the
Standard values for the
name attribute include the following:
- Must be a short free-form string giving the name of the Web application that the page represents. If the page is not a Web application, the
application-namemetadata name must not be used. There must not be more than one meta element with its name attribute set to the value
application-nameper 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.
- Free-form string giving the name of one of the page's authors.
- Free-form string that describes the page. The value must be appropriate for use in a directory of pages, e.g. in a search engine. There must not be more than one
metaelement with its
nameattribute set to the value
- Free-form string that identifies one of the software packages used to generate the document. This value must not be used on hand-authored pages.
- The value must be a set of comma-separated tokens, each of which is a keyword relevant to the page. For example, keywords for the current page could include "html5 meta tag, element, metadata, meta data, keyword, keywords, description, generator, application-name, author"
Values for the
Possible values for the