W3Cschool:
<Meta> elements provide meta-information about pages, such as descriptions and keywords for search engines and update frequency.
<Meta> the tag is in the document header and does not contain any content. <Meta> the tag attribute defines the name/value pairs associated with the document.
Differences between HTML and XHTML
In HTML, the <meta> tag has no ending tag.
In XHTML, the <meta> label must be properly disabled.
Tips and notes:
Note: <meta> the tag is always inside the head element.
Note: Metadata is always transmitted in pairs by name/value.
Name attribute
The name attribute provides the name in the name/value pair. No pre-defined <meta> names are specified for HTML and XHTML tags. Generally, you can use meaningful names for yourself and readers of the source document.
"Keywords" is a frequently used name. It defines a set of keywords for the document. Some search engines use these keywords to classify documents.
Meta Tags like this may be helpful for indexing the search engine:
Http-equiv attributes
The http-equiv attribute provides a name for the name/value pair. And instruct the server to include the name/value pair in the header of the MIME document to be sent to the browser before sending the actual document.
When the server sends a document to a browser, it first sends many name/value pairs. Although some servers send many such name/value pairs, all servers must send at least one: content-type: text/html. This tells the browser to accept an HTML document.
When you use the <meta> tag with the http-equiv attribute, the server adds the name/value pair to the Content Header sent to the browser.
Content Attributes
The content attribute provides values in the name/value pair. This value can be any valid string.
The content attribute must always be used with the name or http-equiv attribute.
Scheme attributes
The scheme attribute is used to specify the scheme for translating attribute values. This solution should be defined in the profile file specified by the profile attribute of the
Meta is used to simulate HTTP Response Header packets in HTML documents. Meta Tags are used in
Name attribute
1. <meta name = "Generator" contect = ""> describes generation tools (such as Microsoft FrontPage 4.0;
2. <meta name = "KEYWords" contect = ""> describe KEYWords Of Your webpage to search engines;
3. <meta name = "DEscription" contect = ""> tell the search engine the main content of your site;
4. <meta name = "Author" contect = "Your name"> tell the search engine the creator of your site;
5. <meta name = "Robots" contect = "all | none | index | noindex | follow | nofollow">
The attributes are described as follows:
Set to all: the file will be retrieved, and the link on the page can be queried;
Set to none: files will not be retrieved, and links on the page cannot be queried;
Set to index: the file will be retrieved;
Set to follow: links on the page can be queried;
Set to noindex: the file will not be retrieved, but the link on the page can be queried;
Set to nofollow: files will not be retrieved, and links on the page can be queried.
Http-equiv attributes
1. <meta http-equiv = "Content-Type" contect = "text/html"; charset = gb_2312-80 ">
And <meta http-equiv = "Content-Language" contect = "zh-CN"> to describe the text and Language used by the homepage;
Also such as English is the ISO-8859-1 character set, there are BIG5, UTF-8, shift-Jis, Euc, Koi8-2 and other character sets;
2. <meta http-equiv = "Refresh" contect = "n; url = http: // yourlink"> regularly redirect a webpage to the http: // yourlink;
3. <meta http-equiv = "Expires" contect = "Mon, 12 May 2001 00:20:00 GMT"> you can set the expiration time of a webpage, once it expires, it must be called again on the server. Note that the GMT time format must be used;
4. <meta http-equiv = "Pragma" contect = "no-cache"> is used to disable the browser from accessing the page content from the cache of the local machine, once the page is set, it cannot be called out from the Cache;
5. <meta http-equiv = "set-cookie" contect = "Mon, 12 May 2001 00:20:00 GMT"> cookie setting: If the webpage expires, the cookie on the disk will be deleted. Note that the GMT time format must be used;
6. <meta http-equiv = "Pics-label" contect = ""> webpage rating: There is a content setting in internet Options of IE, it can prevent browsing of some restricted websites, and the website's restricted level is set through the meta attribute;
7. <meta http-equiv = "windows-Target" contect = "_ top"> force the page to be displayed on an independent page in the current window, it can prevent your webpage from being called as a frame page by others;
8. <meta http-equiv = "Page-Enter" contect = "revealTrans (duration = 10, transtion = 50) "> and <meta http-equiv =" Page-Exit "contect =" revealTrans (duration = 20, transtion = 6) "> set the special effect when you enter and Exit the Page, this function is called "format/Webpage transition" in FrontPage, but the page to be added cannot be a frame page.