web前端入门到实战:Html头部meta标签-创新互联-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

web前端入门到实战:Html头部meta标签-创新互联

meta元素有4个属性:name、http-equiv、content、charset.meta标签通过name属性来表述页面文档的元信息,通过http-equiv属性设置http请求指令,通过charset设置页面的字符编码。按照属性设置分类,meta可以分为三类:

创新互联是一家专业提供马山企业网站建设,专注与网站制作、做网站、H5响应式网站、小程序制作等业务。10年已为马山众多企业、政府机构等服务。创新互联专业网站制作公司优惠进行中。

name属性和content属性组合,构成名称/值对,用于描述网站信息.

标准的meta名称包括application-name、author、description、generator等。 示例代码:

其中keywords和description这两个名称的使用率最高,是搜索引擎优化的主要手段之一,推荐读者使用。

http-equiv属性和content属性组合,设置特定的http指令;

其中content-type、default-style和refresh已经确定,content-language和set-cookie还未正式确定.

此类型meta应该谨慎使用。不推荐使用,某些搜索引擎遇到此meta时会停止解析 页面剩余的部分。在实际的场景中很少使用

charset属性,设置页面字符编码。

此属性提供了保存和传输文档的编码格式。

等价于

但是第一种形式更简洁好记,并且得到了所有主流浏览器的支持,所有不存在浏览器兼容问题。为 了让浏览器能准确识别编码格式,务必在标签之前设置charset,保证标题能正确显示。</p><blockquote><p>除了W3C定义的规范中定义的这些meta之外,还有大量的自定义meta类型。这些meta类型主要是由互联网公司或者浏览器厂商为了实现特定的功能而定制的。这些自定义的meta不能通过W3C提供的标准校验,但并不是说这些meta不标准。介绍一些常用的meta</p></blockquote> <p><strong>设置IE浏览器的兼容模式</strong></p><p>从IE8浏览器开始支持一种设置页面兼容模式的meta类型,示例代码如下:</p><pre><code><meta http-equiv="X-UA-Compatible" content="IE=8"/> 专门建立的学习Q-q-u-n ⑦⑧④-⑦⑧③-零①② 分享学习方法和需要注意的小细节,互相交流学习,不停更新最新的教程和学习技巧(从零基础开始到WEB前端项目实战教程,学习工具,全栈开发学习路线以及规划)</code></pre> <p>根据html规范,浏览器是按照页面开头定义的文档类型来解析页面的。例如,使用html5的文档类型声明:</p><pre><code><!DOCTYPE html></code></pre> <p>IE就会以标准模式解析HTML文档。但是某些已有页面由于各种原因不能在最新标准模式下正确显示,只支持特定的标准。针对这种情况,IE浏览器提供了一种兼容的方案,通过设置X-UA-Compatible指定页面在IE浏览器中渲染时执行的标准。</p><p>此外还有一种很常见的设置值,即:</p><pre><code><meta http-equiv="X-UA-Compatible" content="chrome=1"/></code></pre> <p>IE定义的meta为什么会出现chrome呢?其实设置为chrome=1时,则会在IE9及以下浏览器中激活Chrome Frame,强制IE使用Chrome Frame渲染页面。</p> <br> 分享文章:web前端入门到实战:Html头部meta标签-创新互联 <br> URL网址:<a href="http://kswsj.cn/article/doiddj.html">http://kswsj.cn/article/doiddj.html</a> </div> </div> <div class="other"> <h3>其他资讯</h3> <ul> <li> <a href="/article/cpicsp.html">智能化建站让企业建站更方便</a> </li><li> <a href="/article/cpisci.html">一口价被秒的三拼域名daodiangou.com搭建到店购平台</a> </li><li> <a href="/article/cpicgc.html">零小闲多渠道融合,颠覆传统食品零售模式</a> </li><li> <a href="/article/cpicpo.html">开影视会员自动续费到2099年自动续费套路太深</a> </li><li> <a href="/article/cpiscd.html">局域网广域网城域网的区别是什么</a> </li> </ul> </div> </div> <div class="line"></div> <!--底部--> <footer id="5"> <div class="foot1 container"> <div class="list"> <div class="item"> <a href="javascript:;"> <span class="ico1"><i class="iconfont"></i><img src="/Public/Home/img/ewm.png" alt=""></span> <strong>关注我们</strong> </a> </div> <div class="item"> <a href="" target="_blank"> <span><i class="iconfont"></i></span> <strong>索要报价</strong> </a> </div> <div class="item"> <a href="" target="_blank"> <span><i class="iconfont"></i></span> <strong>我要咨询</strong> </a> </div> <div class="item"> <a href="" target="_blank"> <span><i class="iconfont"></i></span> <strong>找到我们</strong> </a> </div> <div class="item"> <a href="" target="_blank"> <span><i class="iconfont"></i></span> <strong>投诉建议</strong> </a> </div> </div> <div class="tel"> <dl> <tel><a href="tel:400-028-6601" target="_blank">400-028-6601</a></tel><br> <span>也许您需要专业的服务,欢迎来电咨询</span> </dl> <dl> <tel><a href="tel:18980820575" target="_blank">18980820575</a></tel><br> <span>您的需求,是我们前进的动力</span> </dl> </div> </div> <div class="friend"> <div class="container"> <span class="tit">友情链接:</span> <div class="inner"> <a href="https://www.cdcxhl.com/ruanwen/" target="_blank">软文营销</a><a href="https://www.cdcxhl.com/shop.html" target="_blank">商城网站建设</a><a href="https://www.cdcxhl.com/link/" target="_blank">卖友情链接</a><a href="https://www.cdcxhl.com/link/" target="_blank">友情链接买卖</a><a href="https://www.cdcxhl.com/ruanwen/" target="_blank">发布软文</a><a href="https://www.cdcxhl.com/wangzhandingzhi.html" target="_blank">成都定制网页设计</a><a href="https://www.cdcxhl.com/xiaochengx.html" target="_blank">小程序开发公司</a><a href="https://www.cdcxhl.com/ruanwen/" target="_blank">软文发布</a><a href="https://www.cdcxhl.com/ruanwen/" target="_blank">软文投放</a><a href="https://www.cdcxhl.com/gaofang/" target="_blank">高防主机租用</a><a href="https://www.cdcxhl.com/app.html" target="_blank">成都app软件开发</a><a href="https://www.cdcxhl.com/shoulu/" target="_blank">分类目录网站</a><a href="https://www.cdcxhl.com/mobile.html" target="_blank">成都手机网站制作</a><a href="https://www.cdcxhl.com/link/" target="_blank">外链</a><a href="https://www.cdcxhl.com/" target="_blank">网站建设公司</a><a href="https://www.cdcxhl.com/link/" target="_blank">友情链接出售</a><a href="https://www.cdcxhl.com/hangyead/" target="_blank">广告投放平台</a><a href="https://www.cdcxhl.com/quanwang.html" target="_blank">全网营销推广</a> </div> </div> </div> <div class="foot"> <div class="container"> <div class="footNav"> <h3>网站建设</h3> <a href="https://www.cdxwcx.com/city/nanchong/" target="_blank">南充网站建设</a><a href="http://m.cdcxhl.cn/seo/" target="_blank">成都网站建设推广</a><a href="https://www.cdcxhl.com/xiangyingshi.html" target="_blank">响应式网站建设</a> </div> <div class="footNav"> <h3>服务器托管</h3> <a href="https://www.cdcxhl.com/idc/leshan.html" target="_blank">乐山服务器托管</a><a href="https://www.cdcxhl.com/idc/deyang.html" target="_blank">德阳服务器托管</a><a href="https://www.cdcxhl.com/jigui/" target="_blank">机柜租用</a> </div> <div class="footNav"> <h3>网站制作</h3> <a href="http://m.cdcxhl.com/" target="_blank">成都网站制作</a><a href="https://www.cdcxhl.com/mobile.html" target="_blank">手机网站制作设计</a><a href="http://www.cdxwcx.cn/" target="_blank">成都网站制作</a> </div> <div class="footNav"> <h3>企业服务</h3> <a href="https://www.cdcxhl.com/ruanwen/yingxiao/" target="_blank">软文营销</a><a href="https://www.cdcxhl.com/mianfei/jianzhan/" target="_blank">免费建站模板</a><a href="https://www.cdcxhl.com/service/dailijizhang.html" target="_blank">代理记账</a> </div> <div class="fr ecode"> <div class="fl"> <img src="/Public/Home/img/ewm.jpg"> <p>关注企业微信</p> </div> <div class="fr slogan"> <p class="icon"> <a class="ph" href=""><i class="iconfont"></i></a> <a class="qq" href="tencent://message/?uin=1683211881&Site=&Menu=yes"><i class="iconfont"></i></a> </p> <p> <i>想要找 </i> <a href="">小程序开发</a>、<a href="">APP开发</a>、 <a href="">营销型网站建设</a>、<a href="">网站建设</a>、 <i><a href="">网站定制开发</a></i> ,就选<a href="">创新互联</a> </p> </div> </div> </div> <div class="bottom container"> <p class="fl"> 版权所有:成都创新互联科技有限公司 备案号:<a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow">蜀ICP备19037934号</a> 服务热线:028-86922220 </p> <p class="fr"> <a href="https://www.cdxwcx.com/" target="_blank">成都网站建设</a>: <a href="https://www.cdcxhl.com/" target="_blank">创新互联</a> </p> </div> </div> </footer> <!--在线咨询--> <div class="fot"> <ul> <li> <a href="https://p.qiao.baidu.com/cps/mobileChat?siteId=11284691&userId=6256368&type=1&reqParam=%20{%22from%22:0,%22sessionid%22:%22%22,%22siteId%22:%2211284691%22,%22tid%22:%22-1%22,%22userId%22:%226256368%22,%22ttype%22:1,%22siteConfig%22:%20{%22eid%22:%226256368%22,%22queuing%22:%22%22,%22siteToken%22:%226ce441ff9e2d6bedbdfc2a4138de449e%22,%22userId%22:%226256368%22,%22isGray%22:%22false%22,%22wsUrl%22:%22wss://p.qiao.baidu.com/cps3/websocket%22,%22likeVersion%22:%22generic%22,%22siteId%22:%2211284691%22,%22online%22:%22true%22,%22webRoot%22:%22//p.qiao.baidu.com/cps3/%22,%22bid%22:%22160142915792139572%22,%22isSmallFlow%22:0,%22isPreonline%22:0,%22invited%22:0%20},%22config%22:%20{%22themeColor%22:%224d74fa%22%20}%20}&appId=&referer=&iswechat=0&expectWaiter=-1&openid=null&otherParam=null&telephone=null&speedLogId=null&eid=null&siteToken=6ce441ff9e2d6bedbdfc2a4138de449e" target="_blank"> <img src="/Public/Home/img/fot1.png" alt=""> <p>在线咨询</p> </a> </li> <li> <a href="tel:18980820575" target="_blank"> <img src="/Public/Home/img/fot2.png" alt=""> <p>拨打电话</p> </a> </li> </ul> </div> </body> </html> <script> $(".con img").each(function(){ var src = $(this).attr("src"); //获取图片地址 var str=new RegExp("http"); var result=str.test(src); if(result==false){ var url = "https://www.cdcxhl.com"+src; //绝对路径 $(this).attr("src",url); } }); window.onload=function(){ document.oncontextmenu=function(){ return false; } } </script>