Browse By Name
HTMLCSSJavaScriptAppendix
You are here: Reference > HTML > tags > meta

meta element

A A Font size Print Content Add new content Share Share
Browser support:
Specifies general information about the document.
The meta element can be used to specify the character set and content-type of your page, keywords for search engines and other information about your document.
The meta element must be placed in the head section before the body element.
The next table contains only the most commonly used meta tags, for a complete list of available meta definitions, please see the page for the http-equiv or name attributes.
meta type Description
author Records the name of the author of the document.
<meta name="author" content="dottoro.com" />
cache-control Controls the caching mechanism to use for the page.
Available values:
Public - cached in public shared caches
Private - cached in private cache
no-Cache - not cached
no-Store - cached but not archived
<meta http-equiv="cache-control" content="NO-CACHE" />
content-language Specifies the primary natural language(s) of the document. Used by search engines to categorize pages by language.
<meta http-equiv="content-language" content="en-US,de" />
content-type Specifies the character set for the page content. It is recommended to always specify the character set. For a list of character sets, please see the page for the character sets.
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
copyright Used to include copyright information into the document.
<meta name="copyright" content="© 2009 Dottoro.com" />
date Specifies the date and time when the page was created.
<meta http-equiv="date" content="Thu, 18 Nov 2008 19:11:42 GMT" />
description Some search engines pick up this description to show with the results of searches.
<meta name="description" content="...Help page for the meta tag..." />
expires Specifies the date and time when the page will expire.
<meta http-equiv="expires" content="Wed, 9 Nov 2011 12:00:00 GMT" />
keywords Inform search engines what your web site or page is about. It is recommended to always specify this type of meta, because it is necessary for search engines to catalogize the page.
<meta http-equiv="keywords" content="help, html help, JavaScript help, CSS help, manual ..." />
last-modified Specifies the last modification date.
<meta http-equiv="last-modified" content="Thu, 18 Nov 2008 19:11:42 GMT" />
refresh Indicates the document displays for a specified amount of time before switching to a new URL or refreshes the current. Useful to redirecting browsers to other pages, or to refresh the current page (news page).
<meta name="refresh" content="15" /> <meta name="refresh" content="15;URL=http://www.dottoro.com" />
robots Defines pages robot indexing mechanism, search engines indexing and link following rules.
The content attribute should have a comma separated list of the following values:
ALL - Robots should follow links, index and archive this page.
FOLLOW - Search engine robots should follow links from this page.
INDEX - Robots should include and index this page.
NOARCHIVE - Prevent search engines from archiving the page
NOINDEX - Robots should follow links, but should not index the page.
NOFOLLOW - The page can be indexed, but links should not be followed.
NONE - Search engine robots can ignore the page.
<meta name="robots" content="ALL" /> <meta name="robots" content="INDEX,NOFOLLOW" />
If you want to see the HTML tags by categories, please visit this page.
This element cannot have a closing tag.
If you want to use this element dynamically, visit the JavaScript page for this tag: meta.

Possible members:

Attributes
Events
Styles
charset
Sets the character encoding of a linked document or a script block.
content
Sets or returns the meta information itself.
dir
Sets the text direction as related to the lang attribute.
http-Equiv
Sets information for HTTP response message headers. Use it with the content attribute to create a well-defined meta tag.
id
Sets a unique identifier for the object.
lang
Specifies the language of the element.
name
Sets the name given to the meta information. Use it with the content attribute attribute to create a well-defined meta tag.
scheme
Specifies how the value of content should be interpreted, when name is used.
xml:lang
Sets the language code of the XML document.

Example HTML code 1:

This example illustrates the use of the meta element:
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="Windows-1251" />
    <meta http-equiv="Expires" content="Tue, 20 Aug 2020 14:25:27 GMT" />
    <meta name="Author" content="Dave Raggett" />
</head>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content