Home  >  Article  >  Web Front-end  >  Introduction to HTML page Meta (1)

Introduction to HTML page Meta (1)

巴扎黑
巴扎黑Original
2017-04-05 09:56:221429browse

No matter how wonderful your personal website is, it will be difficult for people to discover in the vast ocean of cyberspace. How to promote your personal website, the first methods people think of are nothing more than the following:

● Log in to your personal website in the search engine

● Add a link to your personal website on a well-known website

●Post a post in the forum to promote your personal website

Many people ignore the powerful effect of the HTML tag META. A good META tag design can greatly increase the possibility of your personal website being searched. Are you interested? Let me re-understand the META tag! The META tag is an auxiliary tag in the HEAD area of ​​the HTML language. It is located between the tag and the tag at the head of the HTML document. It provides information invisible to the user. The meta tag is usually used to define the page theme for search engine robots, or to define cookies on the user's browser; it can be used to identify the author, set the page format, mark the content summary and keywords; it can also set the page so that it can be based on You define time intervals to refresh yourself, as well as set RASC content levels, etc. </p> <p> The META tag is divided into two parts: HTTP header information (HTTP-EQUIV) and page description information (NAME). </p> <h2> <span style="color: #b22222">★HTTP-EQUIV</span> </h2> <p> HTTP-EQUIV is similar to the HTTP header protocol. It responds to the browser with some useful information to help display web page content correctly and accurately. Commonly used HTTP-EQUIV types are: </p> <p> <span style="color: #b22222">1, Content-Type and Content-Language (display character set settings)</span></p> <p> Description: Set the character set used by the page to describe the text and language used to create the home page. The browser will call the corresponding character set to display the page content based on this. </p> <p> Usage:<Meta http-equiv="Content-Type" Content="text/html; Charset=gb2312"></p> <p> ​​<Meta http-equiv="Content-Language" Content="zh-CN"></p> <p> Note: The META tag defines the character set used by the HTML page as GB2132, which is the national standard Chinese character code. If "charset=GB2312" is replaced with "BIG5", the character set used on this page is the Traditional Chinese Big5 code. When you browse some foreign sites, IE browser will prompt you that you need to download xx language support to display the page correctly. This function is to know which character set needs to be used to display the page by reading the Content-Type attribute of the META tag of the HTML page. If the corresponding character set is not installed in the system, IE will prompt for downloading. Other languages ​​also correspond to different charsets. For example, the Japanese character set is "iso-2022-jp" and the Korean character set is "ks_c_5601". <br> The Content of Content-Type can also be: text/xml and other document types; </p> <p> Charset options: ISO-8859-1 (English), BIG5, UTF-8, SHIFT-Jis, Euc, Koi8-2, us-ascii, x-mac-roman, iso-8859-2, x-mac-ce, iso-2022-jp, x-sjis, x-euc-jp,euc-kr, iso-2022-kr, gb2312, gb_2312-80, x-euc-tw, x-cns11643-1,x-cns11643-2, etc. Character set; the Content of Content-Language can also be: EN, FR and other language codes. </p> <p> <span style="color: #b22222">2. Refresh</span></p> <p> Description: How long (seconds) does it take for the web page to refresh itself, or how long does it take for the web page to automatically link to other web pages. <br> Usage: <Meta http-equiv="Refresh" Content="30"><br> <Meta http-equiv="Refresh" Content="5; Url=http://www.xia8.net"><br> Note: The 5 means that it will automatically refresh to the URL after staying for 5 seconds. </p> <p> <span style="color: #b22222">3、Expires</span></p> <p> Description: Specify the expiration time of the web page in the cache. Once the web page expires, it must be retrieved from the server. </p> <p> Usage: <Meta http-equiv="Expires" Content="0"></p> <p> ​ <Meta http-equiv="Expires" Content="Wed, 26 Feb 1997 08:21:57 GMT"></p> <p> Note: You must use the GMT time format, or set it directly to 0 (the number indicates how long it will expire after). </p> <p> <span style="color: #b22222">4. Pragma (cach mode)</span></p> <p> Description: Prohibits the browser from accessing page content from the local machine's cache. </p> <p> Usage: <Meta http-equiv="Pragma" Content="No-cach"></p> <p> Note: Web pages are not saved in the cache and are refreshed with each visit. With this setting, visitors will not be able to browse offline. </p> <p> <span style="color: #b22222">5. Set-Cookie (cookie setting)</span></p> <p> Note: When the browser accesses a page, it will be stored in the cache. The next time it is accessed, it can be read from the cache to improve speed. Disable caching when you want visitors to refresh your ad's icon every time, or refresh your counter every time. Usually there is no need to disable caching for HTML files. For pages such as ASP, you can disable caching, because every page you see is dynamically generated on the server, and caching is meaningless. If the web page expires, the saved cookies will be deleted. </p> <p> Usage:<Meta http-equiv="Set-Cookie" Content="cookievalue=xxx; expires=Wednesday,21-Oct-98 16:14:21 GMT; path=/"></p> <p> Note: GMT time format must be used. </p> <p> <span style="color: #b22222">6. Window-target (display window settings)</span></p> <p> Description: Force the page to be displayed as an independent page in the current window. </p> <p> Usage: <Meta http-equiv="Widow-target" Content="_top"></p> <p> Note: This attribute is used to prevent others from calling your page in the frame. Content options: _blank, _top, _self, _parent. </p> <p> <span style="color: #b22222">7. Pics-label (webpage RSAC rating)</span></p> <p> Note: There is a content setting in IE's Internet options that can prevent browsing of some restricted websites, and the restriction level of the website is set through this parameter. </p> <p> Usage: <META http-equiv="Pics-label" Contact="(PICS-1.1'http://www.rsac.org/ratingsv01.html' I gen comment 'RSACi North America Sever' by 'inet@microsoft .com' for 'http://www.microsoft.com' on '1997.06.30T14:21-0500' r(n0 s0 v0 l0))"></p> <p> Note: Do not set the level too high. RSAC's evaluation system provides a standard for evaluating Web site content. Users can set Microsoft Internet Explorer (IE3.0 or above) to exclude sites containing pornographic and violent content. The HTML in the example above was taken from Microsoft's homepage. (n 0 s 0 v 0 l 0) in the code means that the site does not contain inappropriate content. The rating is determined by RSAC, the rating agency of the American Entertainment Council. If you want to know more about the rating content of the RSAC rating system, or if you need to rate your own website, you can visit the RSAC website: http://www.rsac .org/. </p> <p> <span style="color: #b22222">8、Page-Enter、Page-Exit (Enter and Exit)</span></p> <p> Description: These are some special effects when the page is loaded and called out. </p> <p> Usage: <Meta http-equiv="Page-Enter" Content="blendTrans(Duration=0.5)"><br> ​​<Meta http-equiv="Page-Exit" Content="blendTrans(Duration=0.5)"><br> Note: blendTrans is a type of dynamic filter that produces a fade effect. Another dynamic filter, RevealTrans, can also be used for page entry and exit effects: </p> <p> <Meta http-equiv="Page-Enter" Content="revealTrans(duration=x, transition=y)"></p> <p> <Meta http-equiv="Page-Exit" Content="revealTrans(duration=x, transition=y)"></p> <p> Duration represents the duration of the filter effect (unit: seconds)</p> <p> Transition filter type. Indicates which special effect to use, the value is 0-23. </p> <p> 0 Rectangle shrink</p> <p> 1 Rectangular expansion</p> <p> 2 Circle reduction</p> <p> 3 Circle expansion</p> <p> 4 Refresh from bottom to top</p> <p> 5 Refresh from top to bottom</p> <p> 6 Refresh left to right</p> <p> 7 Refresh right to left</p> <p> 8 vertical blinds</p> <p> 9 horizontal blinds</p> <p> 10 Offset horizontal blinds</p> <p> 11 Offset vertical blinds</p> <p> 12 point spread</p> <p> 13 Refresh from left to right to the middle</p> <p> 14 Refresh from center to left and right</p> <p> 15 middle to top and bottom</p> <p> 16 Up and down to the middle</p> <p> 17 Lower right to upper left</p> <p> 18 Upper right to lower left</p> <p> 19 Upper left to lower right</p> <p> 20 Lower left to upper right</p> <p> 21 horizontal bars</p> <p> 22 vertical bars</p> <p> 23 Randomly select one of the above 22 types</p> <p> <span style="color: #b22222">9, MSThemeCompatible (XP theme)</span></p> <p> Description: Whether to turn off the xp theme in IE</p> <p> Usage: <Meta http-equiv="MSThemeCompatible" Content="Yes"></p> <p> Note: Turn off the blue three-dimensional button system display style of xp, which is very similar to win2k. </p> <p> <span style="color: #b22222">10, IE6 (Page Builder)</span></p> <p> Description: The page generator generator is ie6</p> <p> Usage: <Meta http-equiv="IE6" Content="Generator"></p> <p> Note: What it is made of depends on the manufacturer of similar products. </p> <p> <span style="color: #b22222">11. Content-Script-Type (script related)</span></p> <p> Description: This is a recent W3C specification that specifies the type of script in the page. </p> <p> Usage: <Meta http-equiv="Content-Script-Type" Content="text/javascript"><br><br></p> <p> </p><p>The above is the detailed content of Introduction to HTML page Meta (1). For more information, please follow other related articles on the PHP Chinese website!</p></div><div class="nphpQianMsg"><div class="clear"></div></div><div class="nphpQianSheng"><span>Statement:</span><div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn</div></div></div><div class="nphpSytBox"><span>Previous article:<a class="dBlack" title="The difference between ID and NAME in HTML" href="http://m.php.cn/faq/360072.html">The difference between ID and NAME in HTML</a></span><span>Next article:<a class="dBlack" title="The difference between ID and NAME in HTML" href="http://m.php.cn/faq/360077.html">The difference between ID and NAME in HTML</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="http://m.php.cn/article.html" class="bBlack"><i>See more</i><b></b></a></em><div class="clear"></div></div><ul class="nphpXgwzList"><li><b></b><a href="http://m.php.cn/faq/348757.html" title="Summary of Html knowledge" class="aBlack">Summary of Html knowledge</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348804.html" title="How to learn HTML quickly" class="aBlack">How to learn HTML quickly</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348873.html" title="The difference between html xhtml xml" class="aBlack">The difference between html xhtml xml</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348884.html" title="The difference between src and href attributes" class="aBlack">The difference between src and href attributes</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348902.html" title="About HTML5 and CSS replacement use" class="aBlack">About HTML5 and CSS replacement use</a><div class="clear"></div></li></ul></div></div><div class="nphpFoot"><div class="nphpFootBg"><ul class="nphpFootMenu"><li><a href="http://m.php.cn/"><b class="icon1"></b><p>Home</p></a></li><li><a href="http://m.php.cn/course.html"><b class="icon2"></b><p>Course</p></a></li><li><a href="http://m.php.cn/wenda.html"><b class="icon4"></b><p>Q&A</p></a></li><li><a href="http://m.php.cn/login"><b class="icon5"></b><p>My</p></a></li><div class="clear"></div></ul></div></div><div class="nphpYouBox" style="display: none;"><div class="nphpYouBg"><div class="nphpYouTitle"><span onclick="$('.nphpYouBox').hide()"></span><a href="http://m.php.cn/"></a><div class="clear"></div></div><ul class="nphpYouList"><li><a href="http://m.php.cn/"><b class="icon1"></b><span>Home</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/course.html"><b class="icon2"></b><span>Course</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/article.html"><b class="icon3"></b><span>Article</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/wenda.html"><b class="icon4"></b><span>Q&A</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/dic.html"><b class="icon6"></b><span>Dictionary</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/course/type/99.html"><b class="icon7"></b><span>Manual</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/xiazai/"><b class="icon8"></b><span>Download</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/faq/zt" title="Topic"><b class="icon12"></b><span>Topic</span><div class="clear"></div></a></li><div class="clear"></div></ul></div></div><div class="nphpDing" style="display: none;"><div class="nphpDinglogo"><a href="http://m.php.cn/"></a></div><div class="nphpNavIn1"><div class="swiper-container nphpNavSwiper1"><div class="swiper-wrapper"><div class="swiper-slide"><a href="http://m.php.cn/" >Home</a></div><div class="swiper-slide"><a href="http://m.php.cn/article.html" class="hover">Article</a></div><div class="swiper-slide"><a href="http://m.php.cn/wenda.html" >Q&A</a></div><div class="swiper-slide"><a href="http://m.php.cn/course.html" >Course</a></div><div class="swiper-slide"><a href="http://m.php.cn/faq/zt" >Topic</a></div><div class="swiper-slide"><a href="http://m.php.cn/xiazai" >Download</a></div><div class="swiper-slide"><a href="http://m.php.cn/game" >Game</a></div><div class="swiper-slide"><a href="http://m.php.cn/dic.html" >Dictionary</a></div><div class="clear"></div></div></div><div class="langadivs" ><a href="javascript:;" class="bg4 bglanguage"></a><div class="langadiv" ><a onclick="javascript:setlang('zh-cn');" class="language course-right-orders chooselan " href="javascript:;"><span>简体中文</span><span>(ZH-CN)</span></a><a onclick="javascript:;" class="language course-right-orders chooselan chooselanguage" href="javascript:;"><span>English</span><span>(EN)</span></a><a onclick="javascript:setlang('zh-tw');" class="language course-right-orders chooselan " href="javascript:;"><span>繁体中文</span><span>(ZH-TW)</span></a><a onclick="javascript:setlang('ja');" class="language course-right-orders chooselan " href="javascript:;"><span>日本語</span><span>(JA)</span></a><a onclick="javascript:setlang('ko');" class="language course-right-orders chooselan " href="javascript:;"><span>한국어</span><span>(KO)</span></a><a onclick="javascript:setlang('ms');" class="language course-right-orders chooselan " href="javascript:;"><span>Melayu</span><span>(MS)</span></a><a onclick="javascript:setlang('fr');" class="language course-right-orders chooselan " href="javascript:;"><span>Français</span><span>(FR)</span></a><a onclick="javascript:setlang('de');" class="language course-right-orders chooselan " href="javascript:;"><span>Deutsch</span><span>(DE)</span></a></div></div><script> var swiper = new Swiper('.nphpNavSwiper1', { slidesPerView : 'auto', observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper }); </script></div></div><!--顶部导航 end--><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script></div><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>jQuery.fn.wait = function (func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = this.selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } $("table.syntaxhighlighter").wait(function() { $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>"); }); $(document).on("click", ".cnblogs_code_footer",function(){ $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide(); }); $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}}); </script></body></html>