Use description in meta tag web development and meta tag web use

Source: Internet
Author: User

Use description in meta tag web development and meta tag web use

Meta Tags provide metadata about HTML documents. It can be used to "tell" the browser how to display the content, reload the page, the search engine specifies the keyword, or for other web Services.


Meta tag attributes

Attribute Value Description
Content Some text Define metadata related to the http-equiv or name attribute

Optional attributes

Attribute Value Description
Http-equiv Content-type/expire/refresh/set-cookie Associate the content attribute with the HTTP header.
Name Author/description/keywords/generator/revised/others Associate the content attribute with a name.
Content Some text Defines the format used to translate the content property value.
Search engine SEO Optimization
  • Page keywords: each page should have a unique set of keywords that describe the content of the page.
    Users may search for and accurately describe descriptive and representative keywords and phrases of the information provided on the webpage. If the TAG content is too short, the search engine may not consider the content as relevant. It cannot exceed 874 characters.
<meta name="keywords" content="your tags" />
  • Page Description: each page should contain a description tag that cannot exceed 150 characters and can accurately reflect the content of the page.
<meta name="description" content="150 words" />
  • Search engine indexing: robotterms is a set of Comma (,)-separated values. Generally, there are several values: none, noindex, nofollow, all, index, and follow. Make sure that the nofollow and noindex attribute values are used correctly.
<Meta name = "robots" content = "index, follow"/> <! -- 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; index: files will be retrieved; follow: links on the page can be queried; noindex: files will not be retrieved; nofollow: links on the page cannot be queried. -->
  • Page redirection and refresh: the number in the content indicates the time (in seconds), and the amount of time is refreshed. If a url is added, the webpage is redirected to the specified webpage (the search engine can automatically detect the webpage and is easily punished by the engine as misleading ).
<meta http-equiv="refresh" content="0;url=" />
Browser webpage behavior settings
  • Declarative Encoding
<meta charset='utf-8' />
  • The latest version of IE and Chrome are preferred.
<Meta http-equiv = "X-UA-Compatible" content = "IE = edge, chrome = 1"/> <! -- About X-UA-Compatible --> <meta http-equiv = "X-UA-Compatible" content = "IE = 6"> <! -- Use IE6 --> <meta http-equiv = "X-UA-Compatible" content = "IE = 7"> <! -- Use IE7 --> <meta http-equiv = "X-UA-Compatible" content = "IE = 8"> <! -- Use IE8 -->
Browser kernel control: Many browsers in China are webkit and Trident. The webkit kernel supports high-speed browsing, And the IE kernel is compatible with web pages and old websites. The website that adds meta tags can control the kernel rendering that the browser chooses.


 <meta name="renderer" content="webkit|ie-comp|ie-stand">


The default Kernel Mode of the domestic dual-core browser is as follows:
1. sogou high-speed browser and QQ Browser: IE kernel (compatible mode)

  • Prohibit the browser from accessing the page content from the cache of the Local Computer: in this way, visitors will not be able to browse offline.
<meta http-equiv="Pragma" content="no-cache">
  • Windows 8
<Meta name = "msapplication-TileColor" content = "#000"/> <! -- Windows 8 tile color --> <meta name = "msapplication-TileImage" content = "icon.png"/> <! -- Windows 8 tile icon -->
  • Site Adaptation: Mainly used for PC-Mobile Page correspondence.
<Meta name = "mobile-agent" content = "format = [wml | xhtml | html5]; url = url"> <! -- [Wml | xhtml | html5] select one of the Protocol languages based on the mobile phone page. url = "url" indicates the mobile phone page URL corresponding to the current PC page, the two must have a one-to-one relationship. -->
  • Transcoding statement: Opening a webpage with Baidu may transcode the webpage (such as posting an advertisement). To avoid transcoding, you can add the following meta.
<meta http-equiv="Cache-Control" content="no-siteapp" />



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.