HTML中头部元素、字符实体的示例分析

这篇文章将为大家详细讲解有关HTML中头部元素、字符实体的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

创新互联网站建设由有经验的网站设计师、开发人员和项目经理组成的专业建站团队,负责网站视觉设计、用户体验优化、交互设计和前端开发等方面的工作,以确保网站外观精美、网站设计、成都做网站易于使用并且具有良好的响应性。

元素是所有头部元素的容器。 内的元素可包含脚本,指示浏览器在何处可以找到样式表,提供元信息,等等。

以下标签都可以添加到 head 部分:、<base>、<link>、<meta>、<script> 以及 <style>。</p><p><title> 标签定义文档的标题。</p><p>title 元素在所有 HTML/XHTML 文档中都是必需的。</p><p>title 元素能够:</p><p>定义浏览器工具栏中的标题提供页面被添加到收藏夹时显示的标题显示在搜索引擎结果中的页面标题</p><p>元数据(metadata)是关于数据的信息。</p><p><meta> 标签提供关于 HTML 文档的元数据。元数据不会显示在页面上,但是对于机器是可读的。</p><p>典型的情况是,meta 元素被用于规定页面的描述、关键词、文档的作者、最后修改时间以及其他元数据。</p><p><meta> 标签始终位于 head 元素中。</p><p>元数据可用于浏览器(如何显示内容或重新加载页面),搜索引擎(关键词),或其他 web 服务。</p><p>一些搜索引擎会利用 meta 元素的 name 和 content 属性来索引您的页面。</p><p>下面的 meta 元素定义页面的描述:</p><p><meta name="description" content="Free Web tutorials on HTML, CSS, XML" /></p><p>下面的 meta 元素定义页面的关键词:</p><p><meta name="keywords" content="HTML, CSS, XML" /></p><p><base> 标签为页面上的所有链接规定默认地址或默认目标(target):</p><p><head></p><p><base href="" /></p><p><base target="_blank" /></p><p></head></p><p><link> 标签定义文档与外部资源之间的关系。</p><p><link> 标签最常用于连接样式表:</p><p><head></p><p><link rel="stylesheet" type="text/css" href="mystyle.css" /></p><p></head></p><p><style> 标签用于为 HTML 文档定义样式信息。</p><p>您可以在 style 元素内规定 HTML 元素在浏览器中呈现的样式:</p><p><head></p><p><style type="text/css"></p><p>body {background-color:yellow}</p><p>p {color:blue}</p><p></style></p><p></head></p><p><script> 标签用于定义客户端脚本,比如 JavaScript。</p><p>我们会在稍后的章节讲解 script 元素。</p><p>HTML 中的预留字符必须被替换为字符实体。</p><p>在 HTML 中,某些字符是预留的。</p><p>在 HTML 中不能使用小于号(<)和大于号(>),这是因为浏览器会误认为它们是标签。</p><p>如果希望正确地显示预留字符,我们必须在 HTML 源代码中使用字符实体(character entities)。</p><p>字符实体类似这样:</p><p>&entity_name;</p><p>或者</p><p>&#entity_number;</p><p>如需显示小于号,我们必须这样写:< 或 <</p><p>提示:使用实体名而不是数字的好处是,名称易于记忆。不过坏处是,浏览器也许并不支持所有实体名称(对实体数字的支持却很好)。</p><p>HTML 中的常用字符实体是不间断空格( )。</p><p>浏览器总是会截短 HTML 页面中的空格。如果您在文本中写 10 个空格,在显示该页面之前,浏览器会删除它们中的 9 个。如需在页面中增加空格的数量,您需要使用   字符实体。</p><p>注释:实体名称对大小写敏感!</p><p>关于“HTML中头部元素、字符实体的示例分析”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。</p> <br> 本文名称:HTML中头部元素、字符实体的示例分析 <br> 路径分享:<a href="http://csruizhi.cn/article/jjhooi.html">http://csruizhi.cn/article/jjhooi.html</a> </div> </div> <div class="other"> <h3>其他资讯</h3> <ul> <li> <a href="/article/ddsohih.html">怎么ping一下你的域名 域名怎么看ip</a> </li><li> <a href="/article/ddsohge.html">发邮件代码java 发邮件代码41</a> </li><li> <a href="/article/ddsohcp.html">帝国cms怎么做幻灯片 帝国cms教程guan方完整版</a> </li><li> <a href="/article/ddsohgh.html">wordpress日志 wordpress日志接入</a> </li><li> <a href="/article/ddsohgg.html">c语言函数都代表什么 c语言函数是啥</a> </li> </ul> </div> </div> <div class="footer2"> Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号 <br />友情链接: <a href="http://m.cdcxhl.cn/dingzhi/" target="_blank">定制网站制作 </a><a href="http://www.cxjianzhan.com/baojia/" target="_blank">网站建设费用 </a><a href="http://chengdu.kswjz.com/" target="_blank">成都网站设计 </a><a href="http://www.4006tel.net/vision/website.html" target="_blank">网站设计 </a><a href="http://www.myzitong.com/" target="_blank">梓潼网站设计 </a><a href="http://m.xwcx.net/" target="_blank">H5网站制作 </a><a href="http://www.4006tel.net/" target="_blank">app网站建设 </a><a href="http://www.cdkjz.cn/fangan/" target="_blank">企业网站设计 </a><a href="https://www.cdxwcx.com/" target="_blank">成都网站设计 </a><a href="http://www.cdxwcx.cn/" target="_blank">成都网站制作公司 </a><a href="http://m.cdcxhl.com/liucheng.html" target="_blank">成都网站建设流程 </a><a href="http://www.cdxtjz.com/" target="_blank">网站制作 </a><a href="http://chengdu.cdcxhl.cn/" target="_blank">成都网站设计 </a><a href="https://www.cdcxhl.com/xiangyingshi.html" target="_blank">成都响应式网站建设 </a><a href="http://chengdu.cdcxhl.cn/dingzhi/" target="_blank">高端定制网站设计 </a><a href="https://www.cdxwcx.com/" target="_blank">成都网站建设公司 </a><a href="http://m.cdcxhl.com/muban.html" target="_blank">成都模版网站建设 </a><a href="http://www.kswcd.cn/" target="_blank">专业网站建设 </a><a href="http://www.cxjianzhan.cn/" target="_blank">网站建设开发 </a><a href="http://www.cxhlcq.com/zhizuo/" target="_blank">重庆网站制作 </a><a href="http://seo.cdkjz.cn/wangzhan/" target="_blank">营销型网站建设 </a><a href="http://m.cdcxhl.com/dingzhi.html" target="_blank">定制网站建设多少钱 </a></div> </body> </html> <script src="/Public/Home/js/wow.min.js"></script> <script> if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) { new WOW().init(); }; </script> <div class="sidebar"> <ul> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=244261566&site=www.csruizhi.cn&menu=yes" target="_blank"><img src="/Public/Home/images/right_qq.png" /></a></li> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=1683211881&site=www.csruizhi.cn&menu=yes" target="_blank"><img src="/Public/Home/images/qq.png" /></a></li> <li class="tel"><a href="tel:028-86922220"><img src="/Public/Home/images/right_tel.png" /></a></li> <div class="wx"> <span class="weixin"><img src="/Public/Home/images/weixin.jpg"><br> 微信扫一扫在线咨询</span> </div> <li><a class="fx" href="#hero"><img src="/Public/Home/images/right_up.png" /></a></li> </ul> </div> <script type="text/javascript"> $(function () { $('.sidebar .fx').click(function () { $('html,body').animate({ scrollTop: '0px' }, 800); }); }); </script> <script type="text/javascript"> $(document).ready(function () { $("#fancybox-manual-b").click(function () { $.fancybox.open({ href: 'map.html', type: 'iframe', padding: 5 }); }) }); </script> <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>