HTML META tags in a detailed

Source: Internet
Author: User

Meta is primarily a sub- HTTP header information (HTTP-EQUIV) and page description information (NAME). The header information includes the document type, character set, language and other browsers to correctly display the information and processing actions of the Web page, such as the content of keywords, abstracts, authors and definitions robots behavior, to provide information for the search engine index.

The META tag is defined in the head and the main parameters are as follows:
HTTP-EQUIV: Connect the Content property to an HTTP header field that is passed as the component of the HTTP header
Name: The content property is concatenated with a name, and the value of the content property is sent when the data for this name is requested
Content: Provide values based on different property values for HTTP-EQUIV or name
Lang: Specifies the language of this meta tag

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>

Describes the Web page type and character encoding information, which is recommended and placed at the top of the head area. This is the value of the property that is sent with the HTTP header (which is not normally sent by the server now) or read by the client. Although the content is included in the XHTML standard Document Declaration section, it is recommended to set it in Meta to better compatible with some browsers and search engines .

<meta http-equiv= "Content-language" content= "ZH-CN"/>

The national language code for the description document. In XHTML, you can set it in the Xml:lang and Lang properties of

<meta http-equiv= "Refresh" content= "15; Url=http://hcc0926.blog.51cto.com "/>

The webpage automatically turns to URL after 15 seconds. Use caution to jump, otherwise the search engine may be considered cheating, not conducive to site optimization. If you use meta jumps, the time is better than 10 seconds.

<meta http-equiv= "Expires"Content= "Wed, 1997 08:21:57 GMT"/>
Specifies the expiration time of the page in the cache. Note: You must use the time format of GMT or set directly to 0
<meta http-equiv= "Pragma"content= "No-cach"/>
Prevents the browser from accessing the contents of the page from the local machine's cache
<meta http-equiv= "Widow-target" content= "_top"/>
Force the page to appear on a separate page in the current window to prevent others from calling your page
in the frame
。 Content options: _blank, _top, _self, _parent

The above is the HTTP-EQUIV header information, for the user agent to provide document information or define browser action, the following name is mainly for the search engine to provide content description information and robots definition, the search engine optimization plays a role.

<meta name= "Keywords"Content= "Word1,word2 ..."/>

Describe the contents of this document keyword, it is advisable to choose a slightly cooler combination of words, six groups or so; SE is more sensitive to keyword, the role is not very large, if the accumulation of keywords or name is not true, it may be punished by the search engine, so ningquewulan.
<meta name= "kyewords" lang= "en" content= "vacation,greece,sunshine"/>
When several meta elements provide document language information, search engines use the Lang feature to filter and display search results through the user's language precedence reference.

<meta name= "Description" content= "description of Web Information"/>

Describe the main content of the Web page to help search engines and users understand the web snippets. Because SE is different, it is advisable to use about 100 words. The abstract needs to give different descriptions to different pages, which explicitly contain the marked facts.

<meta name= "Robots" Content= "all| none| Index| Noindex| follow| Nofollow "/>

Many search engines log on to websites by releasing Robot/spider searches, which robot/spider to use some of the META elements ' features to determine how to log in, although some SE does not support this attribute. Robots is used to tell the search robot which pages need to be indexed and whether to track links. The content parameters are all, none, Index, NOINDEX, follow, nofollow. The default is all.
All: The file will be retrieved and the link on the page can be queried;
None: The file will not be retrieved and the link on the page cannot be queried; (and "Noindex, nofollow" play the same role)
Index: file will be retrieved; (Let Robot/spider log in)
Follow: Links on the page can be queried;
NOINDEX: The file will not be retrieved, but the link on the page can be queried; (Do not let Robot/spider log in)
Nofollow: The file will not be retrieved and the link on the page can be queried. (Do not allow robot/spider to crawl down this page)
Meta robots can control the access to the Web pages page by sheet, and can also declare URLs in the robots.txt file to control the spider's Crawling.

<meta name= "Revisit-after" content= "7 Days"/>

Re-visit time. Sometimes the page is not frequently updated or reduce the burden of the server, you can set a search engine robot next time, of course, if the time is too short, the SE bot will not be on time to revisit, it will only be greater than this time access.

<meta name= "Author" content= "xx"/>
Label the author or production group of the page, either by name or by email
<meta name= "Copyright" content= "This page belongs to XXXX. All rights Reserved "/>
<meta name= "Generator" content= "pcdata| FrontPage "/>
Describe the editor you are using (what do you do with this?) )

Meta tags are commonly used in so many properties, a page is best to have such as content-type,keywords,description, others according to the needs of the common robots,refresh,widow-target.


Reference: Https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/meta

This article is from the "Eason's HCC" blog, so be sure to keep this source http://hcc0926.blog.51cto.com/172833/1558958

HTML META tags in a detailed

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.