开发喵星球

HTML 头部10

HTML 头部10

使用 标签定义HTML文档的标题<br /> 使用 定义页面中所有链接默认的链接目标地址。</p> <p>使用 元素来描述HTML文档的描述,关键词,作者,字符集等。</p> <hr /> <h2>HTML 元素</h2> <p> 元素包含了所有的头部标签元素。在 元素中你可以插入脚本(scripts), 样式文件(CSS),及各种meta信息。</p> <p>可以添加在头部区域的元素标签为: <title>, , , , , 和 。</p> <hr /> <h2>HTML <title> 元素</h2> <p><title> 标签定义了不同文档的标题。</p> <p><title> 在 HTML/XHTML 文档中是必需的。</p> <p><title> 元素:</p> <ul> <li>定义了浏览器工具栏的标题</li> <li>当网页添加到收藏夹时,显示在收藏夹中的标题</li> <li>显示在搜索引擎结果页面的标题</li> </ul> <p>一个简单的 HTML 文档:</p> <h3>实例</h3> <pre data-language="HTML"><code class="language-markup line-numbers"><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>文档标题</title> </head> <body> 文档内容...... </body> </html> </code></pre> <hr /> <h2>HTML 元素</h2> <p> 标签描述了基本的链接地址/链接目标,该标签作为HTML文档中所有的链接标签的默认链接:</p> <h3>实例</h3> <pre data-language="HTML"><code class="language-markup line-numbers"><head> <base href="http://www.kaifamiao.com/images/" target="_blank"> </head> </code></pre> <hr /> <h2>HTML 元素</h2> <p> 标签定义了文档与外部资源之间的关系。</p> <p> 标签通常用于链接到样式表:</p> <h3>实例</h3> <pre data-language="HTML"><code class="language-markup line-numbers"><head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> </code></pre> <hr /> <h2>HTML 元素</h2> <p> 标签定义了HTML文档的样式文件引用地址.</p> <p>在 元素中你也可以直接添加样式来渲染 HTML 文档:</p> <h3>实例</h3> <pre data-language="HTML"><code class="language-markup line-numbers"><head> <style type="text/css"> body { background-color:yellow; } p { color:blue } </style> </head> </code></pre> <hr /> <h2>HTML 元素</h2> <p>meta标签描述了一些基本的元数据。</p> <p> 标签提供了元数据.元数据也不显示在页面上,但会被浏览器解析。</p> <p>META 元素通常用于指定网页的描述,关键词,文件的最后修改时间,作者,和其他元数据。</p> <p>元数据可以使用于浏览器(如何显示内容或重新加载页面),搜索引擎(关键词),或其他Web服务。</p> <p> 一般放置于 区域</p> <h2> 标签- 使用实例</h2> <p>为搜索引擎定义关键词:</p> <pre data-language="HTML"><code class="language-markup line-numbers"><meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript"> </code></pre> <p>为网页定义描述内容:</p> <pre data-language="HTML"><code class="language-markup line-numbers"><meta name="description" content="免费 Web & 编程 教程"> </code></pre> <p>定义网页作者:</p> <pre data-language="HTML"><code class="language-markup line-numbers"><meta name="author" content="Runoob"> </code></pre> <p>每30秒钟刷新当前页面:</p> <pre data-language="HTML"><code class="language-markup line-numbers"><meta http-equiv="refresh" content="30"> </code></pre> <hr /> <h2>HTML 元素</h2> <p>标签用于加载脚本文件,如: JavaScript。</p> <p> 元素在以后的章节中会详细描述。</p> <hr /> <h2>HTML head 元素</h2> <table> <thead> <tr> <th align="left">标签</th> <th align="left">描述</th> </tr> </thead> <tbody> <tr> <td align="left"></td> <td align="left">定义了文档的信息</td> </tr> <tr> <td align="left"><title></td> <td align="left">定义了文档的标题</td> </tr> <tr> <td align="left"></td> <td align="left">定义了页面链接标签的默认链接地址</td> </tr> <tr> <td align="left"></td> <td align="left">定义了一个文档和外部资源之间的关系</td> </tr> <tr> <td align="left"></td> <td align="left">定义了HTML文档中的元数据</td> </tr> <tr> <td align="left"></td> <td align="left">定义了客户端的脚本文件</td> </tr> <tr> <td align="left"></td> <td align="left">定义了HTML文档的样式文件</td> </tr> </tbody> </table>     <div style="display:none;" id="content"> </div> </div> </div> <span class="post-category">分类:<a href="https://kaifamiao.dev/?cat=14" rel="category">前端工程师</a></span> <span class="post-author">作者:<a href=/?author=5>荡荡, 浩浩</a></span> <span class="post-date">发表于:2024-03-13 17:54:23</span> <span class="post-views">阅读量:89</span> <style> .align-left-right { display: flex; justify-content: space-between; } </style> <div class="align-left-right"> <span><< <a href="https://kaifamiao.dev/?p=7837" rel="next">HTML 样式- CSS(11)</a></span> <span> <a href="https://kaifamiao.dev/?p=7817" rel="prev">HTML 链接9</a> >></span> </div> <hr> <hr/> <nav> <h3>类别及文章数量:</h3> <ul> <li><a href="https://kaifamiao.dev/?cat=241">1</a> (1)</li><li><a href="https://kaifamiao.dev/?cat=220">Business</a> (3)</li><li><a href="https://kaifamiao.dev/?cat=178">C/C++</a> (11)</li><li><a href="https://kaifamiao.dev/?cat=25">Go语言</a> (6)</li><li><a href="https://kaifamiao.dev/?cat=10">Java/OOP</a> (427)</li><li><a href="https://kaifamiao.dev/?cat=26">Linux</a> (4)</li><li><a href="https://kaifamiao.dev/?cat=221">News</a> (3)</li><li><a href="https://kaifamiao.dev/?cat=29">Node.js</a> (10)</li><li><a href="https://kaifamiao.dev/?cat=30">Python</a> (8)</li><li><a href="https://kaifamiao.dev/?cat=239">Wordpress</a> (3)</li><li><a href="https://kaifamiao.dev/?cat=20">云创动力</a> (36)</li><li><a href="https://kaifamiao.dev/?cat=14">前端工程师</a> (66)</li><li><a href="https://kaifamiao.dev/?cat=171">喵星人</a> (3)</li><li><a href="https://kaifamiao.dev/?cat=16">喵星人成长</a> (32)</li><li><a href="https://kaifamiao.dev/?cat=15">学习资料</a> (19)</li><li><a href="https://kaifamiao.dev/?cat=185">学员日志</a> (5)</li><li><a href="https://kaifamiao.dev/?cat=182">学长分享</a> (380)</li><li><a href="https://kaifamiao.dev/?cat=18">小程序</a> (1)</li><li><a href="https://kaifamiao.dev/?cat=21">技术栈</a> (27)</li><li><a href="https://kaifamiao.dev/?cat=170">数据技术</a> (2)</li><li><a href="https://kaifamiao.dev/?cat=11">数据结构和算法</a> (15)</li><li><a href="https://kaifamiao.dev/?cat=1">未分类</a> (57)</li><li><a href="https://kaifamiao.dev/?cat=13">江湖传言</a> (15)</li><li><a href="https://kaifamiao.dev/?cat=172">玩技术</a> (175)</li><li><a href="https://kaifamiao.dev/?cat=23">管理文档</a> (4)</li><li><a href="https://kaifamiao.dev/?cat=169">语言开发</a> (1)</li><li><a href="https://kaifamiao.dev/?cat=24">金斗云</a> (152)</li></ul> </nav> <p> powered by <a href=" https://kaifamiao.dev"> kaifamiao </a> </p> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/jQuery/jquery.min.js?ver=10.2.1" id="jQuery-CDN-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/KaTeX/katex.min.js?ver=10.2.1" id="Katex-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Emojify.js/js/emojify.min.js?ver=10.2.1" id="Emojify.js-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/ClipBoard/clipboard.min.js?ver=2.0.1" id="copy-clipboard-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/components/prism-core.min.js?ver=1.15.0" id="prism-core-js-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/plugins/autoloader/prism-autoloader.min.js?ver=1.15.0" id="prism-plugin-autoloader-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/plugins/toolbar/prism-toolbar.min.js?ver=1.15.0" id="prism-plugin-toolbar-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/plugins/line-numbers/prism-line-numbers.min.js?ver=1.15.0" id="prism-plugin-line-numbers-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/plugins/show-language/prism-show-language.min.js?ver=1.15.0" id="prism-plugin-show-language-js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js?ver=1.15.0" id="prism-plugin-copy-to-clipboard-js"></script> <script type="text/javascript" id="Front_Style-js-extra"> /* <![CDATA[ */ var FrontStyle = {"openLinkInNewTab":"on"}; /* ]]> */ </script> <script type="text/javascript" src="https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/FrontStyle/frontstyle.min.js?ver=10.2.1" id="Front_Style-js"></script> <script type="text/javascript"> (function ($) { $(document).ready(function () { $(".katex.math.inline").each(function () { var parent = $(this).parent()[0]; if (parent.localName !== "code") { var texTxt = $(this).text(); var el = $(this).get(0); try { katex.render(texTxt, el); } catch (err) { $(this).html("<span class=\"err\">" + err); } } else { $(this).parent().text($(this).parent().text()); } }); $(".katex.math.multi-line").each(function () { var texTxt = $(this).text(); var el = $(this).get(0); try { katex.render(texTxt, el, {displayMode: true}) } catch (err) { $(this).html("<span class=\"err\">" + err) } }); }) })(jQuery); </script> <script type="text/javascript"> window.onload = function () { emojify.setConfig({ img_dir: "https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Emojify.js/images/basic",//前端emoji资源地址 blacklist: { "ids": [], "classes": ["no-emojify"], "elements": ["^script$", "^textarea$", "^pre$", "^code$"] } }); emojify.run(); } </script> <script type="text/javascript"> Prism.plugins.autoloader.languages_path = "https://cdn.jsdelivr.net/wp/wp-editormd/tags/10.2.1/assets/Prism.js/components/"; </script>