meta element
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 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:
<meta http-equiv="cache-control" content="NO-CACHE" />
|
|||||||||||||||||||||
charset |
Specifies the character set for the page content in HTML5. It is recommended to always specify the character set.
In document types other than HTML5, use the 'content-type' meta tag instead.
For a list of character sets, please see the page for the character sets.
<meta charset="UTF-8" />
|
|||||||||||||||||||||
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.
In HTML5, use the charset attribute instead.
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" />
|
|||||||||||||||||||||
googlebot |
This is an addition to the robots META Command, it informs only the Google search engine about indexing, archiving and link following rules.
<meta name="googlebot" content="noarchive" />
|
|||||||||||||||||||||
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 name="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:
<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.
JavaScript page for this element: meta. |
Possible members:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Example HTML code 1:
This example shows how to set the character encoding of the document in HTML5:
|
|||
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> </head> <body> </body> </html> |
|||
|
|||
Did you find this example helpful?
|
Example HTML code 2:
This example shows how to set the character encoding of the document in document types other than HTML5:
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> </body> </html> |
|||
|
|||
Did you find this example helpful?
|
Example HTML code 3:
This example illustrates the use of meta elements:
|
|||
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="Expires" content="Tue, 20 Aug 2020 14:25:27 GMT" /> <meta name="Author" content="Dave Raggett" /> </head> <body> </body> </html> |
|||
|
|||
Did you find this example helpful?
|
Related pages:
External links:
User Contributed Comments