The use of HTML meta tags and some common tags in head

Source: Internet
Author: User
Tags microsoft frontpage



Meta is the response header message used to simulate an HTTP protocol in an HTML document.
Meta is mainly for the sub-HTTP header information (HTTP-EQUIV) and page description information (NAME) header information including the document type, character set, language and other browsers correctly display the information and processing action of the webpage, the page description such as the content of keywords, abstracts, authors and definition of robots behavior, etc. Provides information for search engine indexing.



Meta tags are used in 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



The Name property syntax format for the META tag is:



The Http-equiv property syntax format for the meat tag is:



The Http-equiv property mainly has the following parameters: Http-equiv property http-equiv, as the name implies, is equivalent to the file header of HTTP, it can send back some useful information to the browser to help correctly and accurately display the content of the Web page, The corresponding property value for Content,content is actually the variable value of each parameter.


<Metahttp-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. <Metahttp-equiv= "Content-language"Content= "ZH-CN" />the national language code for the description document. In XHTML, you can<HTML>the Xml:lang and Lang properties are set so that they can not be used.<Metaname= "Generator"Content= "pcdata| FrontPage " />To describe the build tool (such as Microsoft FrontPage 4.0);<Metahttp-equiv= "Refresh"Content= "5; Url=http://www.cnblogs.com/rsky/p/4815777.html " />the webpage automatically turns to URL after 5 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. <Metahttp-equiv= "Expires"Content= "Sat, 1999 06:11: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<Metahttp-equiv= "Pragma"Content= "No-cach" />prevents the browser from accessing the contents of the page from the local machine's cache<Metaname= "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. <Metaname= "Description"CONTENT= "Demo" />tell the search engine the main content of your site;<Metaname= "Author"Content= "XX" />tell the search engine the author of your site's production;<Metaname= "Copyright"Content= "This page is owned by XX. All rights Reserved " />tell the search engine this page copyright xxxx all<Metaname= "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") Index: The file will be retrieved; (Let robot/ Spider login) Follow: The link 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, the link on the page can be queried. (Don't let Robot/spider crawl down this page) Meta robots can control access to the Web page by pages, as well as declare URLs in robots.txt files to control spider crawling. <Metahttp-equiv= "Set-cookie"contect= "mon,12 00:20:00 GMT"> Cookie is set and if the page expires, the cookie will be deleted. It is also important to note that GMT time format must be used;<Metahttp-equiv= "Pics-label"contect=""/> page rating, in IE Internet Options have a content setting, you can prevent browsing some restricted sites, and the limit level of the website is forced meta-attribute to set;<Metahttp-equiv= "Windows-target"contect= "_top">forcing the page to appear in the current window as a separate page prevents your page from being called by others as a frame page;<Metaname= "Kyewords"Lang= "en"Content= "Vacation,greece,sunshine" /><Metaname= "Kyewords"Lang= "FR"Content= "Vacances,grè:ce,soleil" />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. <Metahttp-equiv= "Page-exit"content= "Revealtrans (duration=5.0, transition=20)"><Metahttp-equiv= "Page-enter"contect= "Revealtrans (duration=10,transtion=)">And<Metahttp-equiv= "Page-exit"contect= "Revealtrans (duration=20,transtion=6)">sets the special effect when entering and leaving the page, which is the "Format/page transition" in FrontPage, but the added page cannot be a frame page. Some other tags in the head <MetaScheme= "ISBN"name= "identifier"content= "0-14-043205-1" />Web content Identification<Linkhref= "Favor.ico"rel= "Shortcut Icon"/>When you save a small icon in your inbox, you'll find it has a small icon<Linkhref= "URL"rel= "Relationship"/>    <Linkhref= "URL"Rev= "Relationship"/>used to link the current file to another URL, but there is no link button<Basehref= "http://www.cnblogs.com/"Target= "_blank"/>Insert Web page Base link Properties Note: All relative paths on your page are prefixed with "www.cnblogs.com" at the time of the link. where target= "_blank" is the link file opened in a new window, you can do other settings.  Change "_blank" to "_parent" is the link file will open in the parent window of the current window, instead the "_self" link file opens in the current window (frame), instead the "_top" link file is displayed in full screen. <Metahttp-equiv= "Imagetoolbar"content= "false" />Specifies whether the Picture toolbar is displayed when the false representation is not displayed, and when True represents the display. <Metahttp-equiv= "Content-script-type"Content= "Text/javascript">Web page specification, indicating the type of script in the page, the default JavaScript<Metaname= "Revisit-after"CONTENT= "5 days" />Revisit-after on behalf of the site re-visit, 7 days for 5 day, and so on. <Metahttp-equiv= "X-ua-compatible"content= "Ie=7">The above code tells IE that the IE8/9 will render the page with the IE7 engine, whether or not the document standard is declared with a DTD. <Metahttp-equiv= "X-ua-compatible"content= "Ie=8">the above code tells IE Browser, IE8/9 will be IE8 engine to render the page. <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge">The above code tells IE Browser, IE8/9 and later version will be the highest version of IE to render the page. <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge,chrome=1">The above code Ie=edge tells IE to use the latest Engine rendering Web page, chrome=1 can activate Chrome Frame.<Metacontent= "WebKit"name= "Renderer">will render the page in extreme speed mode, using WebKit kernel render cache control instead<Metahttp-equiv= "Cache-control"content= "No-cache"/> <Metahttp-equiv= "Cache-control"content= "max-age=300"/>the following line:<Metahttp-equiv= "Cache-control"content= "Max-age=0"/>has the same effect as the following line:<Metahttp-equiv= "Cache-control"content= "No-cache"/>Some WAP browsers do not support the use of<Meta/>tags to control the cache, but they do know the meaning of the HTTP header "Cache-control:no-cache". In this case, the solution is to set the HTTP header in the server-side HTTP response.Some private meta tags in the WebKit kernel <Metacontent= "Width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"name= "Viewport">Forces the width of the document to remain at 1:1 of the width of the device, and the maximum width of the document is 1.0, and does not allow the user to click on the screen to enlarge;<Metacontent= "Yes"name= "Apple-mobile-web-app-capable">Safari Private meta tag in iphone device, which means: Allow full screen mode to browse<Metacontent= "BLACK"name= "Apple-mobile-web-app-status-bar-style">The iphone's private label, which specifies the style of the iphone's status bar on the top of safari<Metacontent= "Telephone=no"name= "Format-detection">tell the device to ignore numbers in the page as phone numbers<Metacontent= "Email=no"name= "Format-detection" />tell the device to ignore numbers in the page as e-mail addresses





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,window-target.






The use of HTML meta tags and some common tags in head


Related Article

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.