Introduction
In my previous blog, there is an introduction to meta, for example: Http://www.haorooms.com/post/liulanq_think_ie browser Security thought of this article, in the middle of the meta-described in some of the properties of IE, Transition transitions between pages can be implemented. has been mentioned in SEO optimization. Here is a detailed description of meta functions and usage.
Preface Meta is an auxiliary tag in the head area of the HTML language. Maybe you think the code is dispensable. In fact, if you can use good meta tags, will bring you unexpected effects, meta tags have the role of: Search engine Optimization (SEO), define the language of the page, automatically refresh and point to the new page, to achieve the dynamic effect of Web page conversion, control page buffering, page rating evaluation, Control page Display window and so on! HTML meta-Summary
Meta tag composition: Meta tags have two attributes, which are the Http-equiv property and the Name property, and different properties have different parameter values, these different parameter values to achieve a different page function.
1. Name property
The name attribute is mainly used to describe the Web page, and its corresponding property value is content,content content is mainly convenient for search engine robot to find information and classification information.
The syntax format for the META tag's Name property is:
<meta name="参数"content="具体的参数值">。
Where the name attribute mainly has the following parameters:
A, Keywords (keywords)
Description: Keywords is used to tell search engines what keywords are on your page.
Example:
<meta name="keywords"content="meta总结,html meta,meta属性,meta跳转">
B, description (Website content description)
Description: Description is used to tell search engines the main content of your website.
Example:
<meta name="description"content="haorooms博客,html的meta总结,meta是html语言head区的一个辅助性标签。">
C, Robots (Robot Wizard)
Description: Robots is used to tell the search robot which pages need to be indexed and which pages do not.
The content parameters are all,none,index,noindex,follow,nofollow. The default is all.
Example:
<meta name="robots"content="none">
The specific parameters are as follows:
The information parameter is all: The file will be retrieved and the link on the page can be queried;
The information parameter is none: The file will not be retrieved, and the link on the page can not be queried;
The information parameter is index: The file will be retrieved;
The information parameter is follow: the link on the page can be queried;
The information parameter is NOINDEX: The file will not be retrieved, but the link on the page can be queried;
The information parameter is nofollow: The file will be retrieved, but the link on the page can not be queried;
D, author (author)
Description: The author of the callout page
Example:
<meta name="author"content="root,[email protected]">
E, generator
<meta name="generator"content="信息参数"/>
Meta tag of the generator information parameter, which represents the description of what the website uses for software production.
F, COPYRIGHT
<META NAME="COPYRIGHT"CONTENT="信息参数">
Meta tag of the copyright information parameters, representative of the website information.
G, Revisit-after
<META name="revisit-after"CONTENT="7days">
Revisit-after on behalf of the site re-visit, 7days for 7 days, and so on.
2. HTTP-EQUIV Properties
Http-equiv, as the name implies, is equivalent to the HTTP file header function, it can send back some useful information to the browser to help correct and accurate display of the content of the Web page, and the corresponding property value of content,content content is actually the variable value of each parameter.
The Http-equiv property syntax format for meta tags is:
<meta http-equiv="参数"content="参数变量值">;
Where the Http-equiv property mainly has the following kinds of parameters:
A, Expires (term)
Description: Can be used to set the expiration time of a Web page. Once the page expires, it must be retransmitted to the server.
Usage:
<meta http-equiv="expires"content="Fri,12Jan200118:18:18GMT">
Note: The time format of GMT must be used.
B, Pragma (cache mode)
Description: Prevents the browser from accessing page content from the local computer's cache.
Usage:
<meta http-equiv="Pragma"content="no-cache">
Note: This setting makes it impossible for visitors to browse offline.
C, refresh (refreshed)
Description: Automatically refreshes and points to the new page.
Usage:
<meta http-equiv="Refresh"content="2;URL=http://www.haorooms.com"> //(注意后面的引号,分别在秒数的前面和网址的后面)
Note: 2 of these are meant to be automatically refreshed to URL URLs after 2 seconds of stay.
D, Set-cookie (Cookie setting)
Note: If the page expires, the cookie will be deleted.
Usage:
<meta http-equiv="Set-Cookie"content="cookie value=xxx;expires=Friday,12-Jan-200118:18:18GMT;path=/">
Note: The time format of GMT must be used.
E, Window-target (display window settings)
Description: Forces the page to appear on a separate page in the current window.
Usage:
<meta http-equiv="Window-target"content="_top">
Note: Used to prevent others from calling their own pages in the frame.
F, Content-type (setting of the display character set)
Description: Sets the character set used by the page.
Usage:
<meta http-equiv="content-Type"content="text/html;charset=gb2312">
Specific as follows:
Meta tag of charset information parameters such as GB2312, the representative of the website is the use of the code is Simplified Chinese;
Meta tag charset information parameters such as BIG5, the representative of the website is the use of the encoding is traditional Chinese;
Meta tag of the charset information parameters such as ISO-2022-JP, the representative of the website is to use the encoding is in Japanese;
Meta tag of the charset information parameters such as ks_c_5601, the representative of the website is to use the encoding is Korean;
Meta tag charset information parameters such as Iso-8859-1, the representative of the website is the use of the code is in English;
Meta tags of the charset information parameters such as UTF-8, representing the world's universal language coding;
G, Content-language (Display language Settings)
Usage:
<meta http-equiv="Content-Language"content="zh-cn"/>
H, Cache-control Specifies the caching mechanism that requests and responses follow.
CACHE-CONTROL Specifies the caching mechanism that requests and responses follow. Setting Cache-control in a request message or response message does not modify the caching process in another message processing process. Cache instructions on request include No-cache, No-store, Max-age, Max-stale, Min-fresh, on
Ly-if-cached, the directives in the response message include public, private, No-cache, No-store, No-transform, Must-revalidate, Proxy-revalidate, Max-age. The instructions in each message have the following meanings
Public indicates that the response can be cached by any buffer
Private indicates that the entire or partial response message for a single user cannot be shared with the cache. This allows the server to simply describe a partial response message for the user, which is not valid for another user's request
No-cache indicates that a request or response message cannot be cached
No-store is used to prevent the inadvertent release of important information. Sending in the request message will make the request and response messages do not use the cache.
Max-age indicates that the client can receive a response that is not longer than the specified time (in seconds)
Min-fresh indicates that the client can receive response times that are less than the current time plus a specified time
Max-stale indicates that the client can receive a response message that exceeds the timeout period. If you specify a value for the Max-stale message, the client can receive a response message that exceeds the specified value for the timeout period.
J, http-equiv= "Imagetoolbar"
<meta http-equiv="imagetoolbar"content="false"/>
Specifies whether the Picture toolbar is displayed when the false representation is not displayed, and when True represents the display.
K, Content-script-type
<Meta http-equiv="Content-Script-Type"Content="text/javascript">
Web page specification that indicates the type of script in the page.
L page jump, only for IE
Please see Http://www.haorooms.com/post/liulanq_think_ie for details.
HTML < Base > tags
Specify the default open mode for all links on the page:
For example:
<base target="_self">
All the labels on the specified page are open on this page!
PS: Original from: Http://www.haorooms.com/post/html_meta_ds
HTML meta-Summary