[s3-e415] Common meta-finishing

Source: Internet
Author: User

< meta > elements

Profile

The tag provides metadata about the HTML Document. The metadata is not displayed on the page, but is readable for the MACHINE. It can be used in browsers (how to display content or reload pages), search engines (keywords), or other web Services. --w3school

Required Attributes

Optional properties

SEO optimization

Reference Document (HTTP://MSDN.MICROSOFT.COM/ZH-CN/LIBRARY/FF724016)

    • Page keywords, Each page should have a unique set of keywords that describe the content of the Page. Use descriptive and Representative keywords and phrases that people may search for and accurately describe the information provided on the Page. Tag content is too short, the search engine may not think of the content as Relevant. Additional tokens should not exceed 874 Characters.

<meta name= "keywords" content= "your tags"/>

    • Page description, Each page should have a no more than 150 characters and can accurately reflect the content of the page description Tag.

<meta name= "description" content= "words/>"

    • Search engine Indexing method, robotterms is a set of values separated by commas (,), usually have the following values: None,noindex,nofollow,all,index and FOLLOW. Make sure that the nofollow and Noindex property 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: the document will be retrieved;

Follow: links on the page can be queried;

Noindex: the document will not be retrieved;

Nofollow: links on the page cannot be Queried.

-

    • Page redirection and refresh: the number within the content represents the time (in Seconds) that is refreshed after a few minutes. If the URL is added, it is redirected to the specified Web page (search engines can be automatically detected and easily punished by the engine as misleading).

<meta http-equiv= "refresh" content= "0;url="/>

    • Other

<meta name= "author" content= "author name"/> <!--define page author--

<meta name= "google" content= "index,follow"/>

<meta name= "googlebot" content= "index,follow"/>

<meta name= "verify" content= "index,follow"/>

Mobile devices

    • Viewport: can optimize the display of mobile Browser. If it is not a responsive web site, do not use Initial-scale or disable Scaling.

Most of the 4.7-5-inch devices have a viewport width of 360px;5.5 inch set to 400px;iphone6 set to 375px;ipone6 plus set to 414px.

<meta name= "viewport" content= "width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>

<!--' width=device-width ' will cause IPhone 5 to appear black when the page is opened in WEBAPP full screen mode after adding to the main screen

    1. Width: widths (values/device-width) (range from 200 to 10,000, default to 980 Pixels)

    2. Height: altitude (value/device-height) (range from 223 to 10,000)

    3. Initial-scale: Initial zoom ratio (range from >0 to 10)

    4. Minimum-scale: the minimum scale to allow the user to zoom

    5. Maximum-scale: allows the user to zoom to the maximum scale

    6. User-scalable: whether the user can manually indent (no,yes)

    7. Minimal-ui: you can minimize the upper and lower status bar when the page loads. (deprecated)

Note that many people use initial-scale=1 to non-responsive websites, which makes the site render at 100% width, and the user needs to manually move the page or zoom. If you use User-scalable=no or maximum-scale=1 with initial-scale=1 at the same time, users will not be able to zoom in/out of the page to see all the Content.

    • WebApp full screen mode: fake app, offline app.

<meta name= "apple-mobile-web-app-capable" content= "yes"/> <!--enable WebApp Full Screen mode--

    • Hide Status Bar/set status bar color: only takes effect when webapp full screen mode is turned On. The content value is default | Black | Black-translucent.

<meta name= "apple-mobile-web-app-status-bar-style" content= "black-translucent"/>

    • Title after adding to the main screen

<meta name= "apple-mobile-web-app-title" content= "title" >

    • Ignore numbers automatically recognized as phone numbers

<meta content= "telephone=no" name= "format-detection"/>

    • Ignore recognition mailboxes

<meta content= "email=no" name= "format-detection"/>

    • Add Smart App Banner Smart app Banner: tell the browser the app that corresponds to this website and display the download Banner (for Example) on the Page. Reference documents

<meta name= "apple-itunes-app" content= "app-id=myappstoreid, affiliate-data=myaffiliatedata, app-argument=myURL" >

    • Additional reference Documents (http://fex.baidu.com/blog/2014/10/html-head-tags/?qq-pf-to=pcqq.c2c)

<!--optimized for handheld devices, mainly for older browsers that do not recognize viewport, such as Blackberry--and

<meta name= "handheldfriendly" content= "true" >

<!--microsoft's Vintage browser--

<meta name= "mobileoptimized" content= ">"

<!--uc Force Vertical screen--

<meta name= "screen-orientation" content= "portrait" >

<!--QQ Forced Vertical screen--

<meta name= "x5-orientation" content= "portrait" >

<!--UC Mandatory fullscreen--

<meta name= "full-screen" content= "yes" >

<!--QQ Mandatory fullscreen--

<meta name= "x5-fullscreen" content= "true" >

<!--UC Application mode--

<meta name= "browsermode" content= "application" >

<!--QQ Application mode--

<meta name= "x5-page-mode" content= "app" >

<!--windows Phone Click No highlight--

<meta name= "msapplication-tap-highlight" content= "no" >

Web related

    • Declaration Code

<meta charset= ' Utf-8 '/>

    • Use the latest version of IE and Chrome first

<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 domestic browsers are Dual-core (webkit and trident), webkit kernel high-speed browsing, IE core-compatible Web pages and the old version of the Site. Web sites that add Meta tags can control what kernel rendering the browser chooses. Reference documents

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

The default kernel mode for Dual-core browsers is as Follows:

1. Sogou high-speed browser, QQ browser: IE core (compatibility Mode)

2.360 speed browser, roaming browser: webkit kernel (fast mode)

    • Prevents browsers from accessing page content from the local Computer's cache: This setting allows visitors 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 phone page of the corresponding relationship.

<meta name= "mobile-agent" content= "format=[wml|xhtml|html5"; Url=url ">

<!--

[wml|xhtml|html5] according to the protocol language of the mobile page, select one of them;

The Url= "url", which represents the URL of the mobile page for the current PC page, must be a one by one correspondence.

-

    • transcoding declaration: using Baidu to open the Web page may be transcoded (such as stickers), to avoid transcoding can add the following meta

<meta http-equiv= "cache-control" content= "no-siteapp"/>

Other reference documents

Complete LIST of HTML META TAGS http://code.lancepollard.com/complete-list-of-html-meta-tags/

The Http://www.w3.org/TR/html5/document-metadata.html#the-meta-element META TAGS

Metatages in HTML5 http://www.html-5.com/metatags/

MDN META TAGS Https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta

Turn from: 1190000002407912

[s3-e415] Common meta-finishing

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.