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
| Properties |
value |
Description |
| Content |
Some text |
Define meta information related to the HTTP-EQUIV or Name property |
Optional Properties
| Properties |
value |
Description |
| Http-equiv |
Content-type/expire/refresh/set-cookie |
Associate the Content property to the HTTP header. |
| Name |
Author/description/keywords/generator/revised/others |
Associate the Content property to a name. |
| Content |
Some text |
Defines the format used to translate content property values. |
SEO optimization
Reference documents
- 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.
<Metaname="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.
<Metaname="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.
<metaname="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 file will be retrieved; Follow: The link on the page can be queried; noindex: The file will not be retrieved; nofollow: The link 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).
<Metahttp-equiv="Refresh"content="0;url=" />
<Metaname="Author"content="author name" /><!-- Define page author--<metaname="Google"content="index, Follow " /><metaname=" Googlebot "content=" Index,follow " /><metaname=" 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.
<metaname="viewport"content="Width=device-width, initial-scale= 1.0,maximum-scale=1.0, User-scalable=no "/><!--' width=device-width ' will cause iPhone 5 to be added to the home screen after WebApp Full-screen mode opens the page with black edges --
- Width: widths (values/device-width) (range from 200 to 10,000, default to 980 pixels)
- Height: Altitude (Value/device-height) (range from 223 to 10,000)
- Initial-scale: Initial zoom ratio (range from >0 to 10)
- Minimum-scale: The minimum scale to allow the user to zoom
- Maximum-scale: Allows the user to zoom to the maximum scale
- User-scalable: Whether the user can manually indent (no,yes)
- 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.
<metaname="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.
<Metaname="Apple-mobile-web-app-status-bar-style"content=" Black-translucent " />
- title after adding to the main screen
<Metaname="Apple-mobile-web-app-title"content="title">
- ignore numbers automatically recognized as phone numbers
<metacontent="Telephone=no"name="format-detection" />
- Ignore recognition Mailboxes
<metacontent="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
<Metaname="Apple-itunes-app"content="App-id=myappstoreid, Affiliate-data=myaffiliatedata, App-argument=myurl ">
- Other reference documents
<!--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
<Metacharset=' 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" ><!--using IE6 -- <meta http-equiv="x-ua-compatible" content="ie=7" > <!--using IE7 -- <meta http-equiv="x-ua-compatible" content="Ie=8" ><!--using 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
<Metaname="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.
<Metahttp-equiv="Pragma"content="No-cache">
<Metaname="Msapplication-tilecolor"content="#000"/> <!--Windows 8 tile Color -- <metaname="Msapplication-tileimage"content="Icon.png" /><!--Windows 8 tile icon --
- site adaptation : Mainly used for pc-mobile phone page of the corresponding relationship.
<metaname="Mobile-agent"content= "FORMAT=[WML|XHTML|HTML5"; url=url><!--[WML|XHTML|HTML5] based on the protocol language of the mobile page, select one of the Url= "URLs" which represent the mobile page URL for the current PC page, The two must be 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
<Metahttp-equiv="Cache-control"content="No-siteapp" / >
HTML Meta tags Common Properties collation