Meta tag usage Daquan

Source: Internet
Author: User

Meta is a functional label that describes a document as defined in the head tag of an HTML document

The META tag has the following effects:

1. Search engine Optimization (SEO)

2. Define the language used for the page

3. Automatically refresh and point to the new page

4. Dynamic effect when web page conversion is implemented

5. Controlling page buffering

6. Website Grading evaluation

7. Control the window displayed on the page

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:

<name= "parameter"content= "Specific parameter value">

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.

<name= "keywords"content= "Science,education,culture,politics, Ecnomics,relationships,entertaiment,human ">

B, description (Website content description)

Description: Description is used to tell search engines the main content of your website.

<name= "description"content= "Thispageisaboutthemeaningofscience , Education,culture. " >

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.

<name= "Robots"content= "None">

D, author (author)

Description: The author of the callout page

<namecontent= "Root,[email protected]"> 

E:renderer (Rendering)

Tell the browser your rendering mode

<name= "renderer"  content= "WebKit">

F:viewport (view mode)

<name= "Viewport"  content= "Width=device-width,initial-scale =1 "/>

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:

<http-equiv= "parameter"content= "parameter variable value">

Where the Http-equiv property mainly has the following kinds of parameters:

Common items: x-ua-compatible (browse mode)

<http-equiv= "x-ua-compatible"  content= "Ie=edge"> 

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.

<http-equiv= "Expires"content= "fri,01jan201618 : 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.

<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.

<http-equiv= "Refresh"  content= "2; Url=http://www.jb51.net ">

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.

<http-equiv= "Set-cookie"content= "cookievalue=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.

<http-equiv= "Window-target"  content= "_blank">

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.

<http-equiv= "Content-type"  content= "text/html;charset=gb2312"  >

G, Content-language (Display language Settings)

<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.

Tips for using META Tags:

Meta tags are used to describe the properties of a Web page in a language, the standard meta tags can facilitate search engine ranking, improve search engine site weight rankings. To the site to do more in line with the search engine standards must understand the META tag, the following from Seoer to tell you about the meaning of meta-tags and how to use:

1. Meta tag keywords

<name= "Keywords"  content= "Information parameter"/>

Meat the Keywords information parameter of the label, which represents the keyword of the website.

2. Meta tag description

<name= "Description"  content= "Information parameter"/> 

Meta tags are description information parameters that represent the main content of the website and what the profile is.

3. Meta tag http-equiv=content-typecontent= "text/html

Http-equiv=content-type represents the HTTP header protocol, prompting the browser Web page for information,

< metahttp-equiv = "Content-type" content = "text/html;charset= information parameter" />

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 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;

4. Meta tag Generator

<name= "Generator"  content= "Information parameter"/>

Meta tag of the generator information parameter, which represents the description of what the website uses for software production.

5. Meta Tag author

<name= "Author"  content= "Information parameters">

Meta tag of the author information parameter, which represents the website copyright author information.

6. Meta tag http-equiv= "Refresh"

<http-equiv= "Refresh"  Content= "time; Url= URL parameters ">

The refresh of the meta tag represents how much time the page is automatically refreshed, plus the URL parameters in the URLs represent how long it takes to automatically link to other URLs.

7. Meta tag http-equiv= "Pragma" content= "No-cache"

<http-equiv= "Pragma"  CONTENT= "No-cache">

The delegate prohibits the browser from accessing the page content from the local computer's cache, so that the visitor cannot browse offline.

8. The copyright of META tags

<NAME= "COPYRIGHT"  CONTENT= "Information parameters">

Meta tag of the copyright information parameters, representative of the website information.

9. Meta tag http-equiv= "Imagetoolbar"

<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.

10. Meta Tag Content-script-type

<http-equiv= "Content-script-type"  Content= "Text/javascript"  >

Web page specification that indicates the type of script in the page.

11. Meta Tag Revisit-after

<name= "Revisit-after"  CONTENT= "7days">

Revisit-after on behalf of the site re-visit, 7days for 7 days, and so on.

12. Meta tag robots

<name= "Robots"  contect= "Information parameters">

Robots representative tells the search engine what pages the robot crawls

The properties are described 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;

Meta tag usage Daquan

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.