"; 2. ""; 3. "<base>"; 4. "<link>"; 5. "<style>"; 6. " <meta>"; 7. "<script>"; 8. "<noscript>"."/><meta property="og:local" content="faq"> <meta property="og:title" content="What are the head tags of html5-Front-end Q&A-php.cn"> <meta property="og:description" content="The head tags of html5 are: 1. "<head>"; 2. "<title>"; 3. "<base>"; 4. "<link>"; 5. "<style>"; 6. " <meta>"; 7. "<script>"; 8. "<noscript>"."> <meta property="og:url" content="https://m.php.cn/faq/486099.html"> <meta property="og:image" content="https://img.php.cn/upload/article/202112/17/2021121711215988732.jpg"> <meta property="og:site_name" content="php.cn"> <meta property="og:type" content="website"> <link rel="canonical" href="https://www.php.cn/faq/486099.html"/> <link rel="alternate" hrefLang="zh-cn" href="https://m.php.cn/zh/faq/486099.html" /> <link rel="alternate" hrefLang="en" href="https://m.php.cn/faq/486099.html" /> <link rel="alternate" hrefLang="zh-tw" href="https://m.php.cn/zh-tw/faq/486099.html" /> <link rel="alternate" hrefLang="ja" href="https://m.php.cn/ja/faq/486099.html" /> <link rel="alternate" hrefLang="ko" href="https://m.php.cn/ko/faq/486099.html" /> <link rel="alternate" hrefLang="ms" href="https://m.php.cn/ms/faq/486099.html" /> <link rel="alternate" hrefLang="fr" href="https://m.php.cn/fr/faq/486099.html" /> <link rel="alternate" hrefLang="de" href="https://m.php.cn/de/faq/486099.html" /> <meta charset="utf-8" /><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><meta name="applicable-device" content="mobile" /><link rel="stylesheet" href="/static/css/style.css?4.5.31"><link href="/static/front/mobcss/newphpcommon.css?1.1" type="text/css" rel="stylesheet"/><link href="/static/front/mobcss/swiper.min.css" type="text/css" rel="stylesheet"/><link href="/static/front/mobcss/newphp.css?1.2" type="text/css" rel="stylesheet"/><link href="/static/css/global.css" type="text/css" rel="stylesheet"/><link href="/static/layui/css/layui.css" type="text/css" rel="stylesheet"/><link href="/static/mobcss/mobindex3.css" type="text/css" rel="stylesheet"/><script src="/static/front/mobjs/jquery-1.6.1.min.js"></script><script src="/static/front/mobjs/swiper.min.js"></script><script src="/static/front/mobjs/newphpcommon.js"></script><link rel="canonical" href="https://www.php.cn/faq/486099.html"/> <link rel="alternate" hrefLang="zh-cn" href="https://m.php.cn/zh/faq/486099.html" /> <link rel="alternate" hrefLang="en" href="https://m.php.cn/faq/486099.html" /> <link rel="alternate" hrefLang="zh-tw" href="https://m.php.cn/zh-tw/faq/486099.html" /> <link rel="alternate" hrefLang="ja" href="https://m.php.cn/ja/faq/486099.html" /> <link rel="alternate" hrefLang="ko" href="https://m.php.cn/ko/faq/486099.html" /> <link rel="alternate" hrefLang="ms" href="https://m.php.cn/ms/faq/486099.html" /> <link rel="alternate" hrefLang="fr" href="https://m.php.cn/fr/faq/486099.html" /> <link rel="alternate" hrefLang="de" href="https://m.php.cn/de/faq/486099.html" /> <script> var canshu = { SeeMore:'See more', FoldUp:'Fold up', Choice:'LANGUAGE', wait:'Loading, please wait~', LoginFirst:"Please log in first", needKeyword:'Enter keyword search', emailPhoneError:'Please enter the correct phone or email address', missPwd:'Please enter the password', emailError:'Please enter your correct email address', VerCode:"Please enter the verification code", getCode:'Sending', pwdError:'Incorrect password format', TwoPassNotMatch:'Two passwords do not match', Bindemail:'Bind email', resetpassword:'reset password', ConfirmPass:'Confirm Password', pwdCheck:'Please enter 6-18 letters or numbers', Editinfor: 'Edit personal information', trimContent:'Please enter content', titleCheck:'Title should be at least 5 words long', choiceLang:'Please select a language classification', Secondreply:'reply', NetWorkError:'Network error, please try again later!', keywordSearch:'Enter keyword search', all_lang_string:'zh|en|zh-tw|ja|ko|ms|fr|de', Next:'Next', Previous:'Previous' }; </script><!-- Google Tag Manager --><script> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WWVXRJPW'); </script><!-- End Google Tag Manager --><!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-H42EVCYBJC"></script><script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-H42EVCYBJC'); </script><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5902227090019525" crossorigin="anonymous"></script><!--<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6267705206177514" crossorigin="anonymous"></script>--><meta property="article:author" content="青灯夜游" /><meta property="article:published_first" content=",https://www.php.cn/faq/486099.html" /><link rel="stylesheet" href="/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css?1"><link rel="stylesheet" href="/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault1.css"><link href="/static/mobcss/newphp.css" type="text/css" rel="stylesheet"/><script src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js"></script><script> var xnb_name = 'Virtual currency'; </script><script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","headline":"What are the head tags of html5","description":"The head tags of html5 are: 1. \"<head>\"; 2. \"<title>\"; 3. \"<base>\"; 4. \"<link>\"; 5. \"<style>\"; 6. \" <meta>\"; 7. \"<script>\"; 8. \"<noscript>\".","image":["https:\/\/img.php.cn\/upload\/article\/202112\/17\/2021121711215988732.jpg"],"datePublished":"2021-12-17T11:24:47+8:00","author":{"url":"https:\/\/m.php.cn\/member\/287557.html","name":"青灯夜游"},"mainEntityOfPage":{"@type":"WebPage","@id":"https:\/\/m.php.cn\/faq\/486099.html"},"url":"https:\/\/m.php.cn\/faq\/486099.html","articleBody":"<blockquote><p>html5的头部标记有:1、“93f0f5c25f18dab9d176bd4f6de5d30e”;2、“b2386ffb911b14667cb8f0f91ea547a7”;3、“dde6fb694e6711ae5e6f381704c04ae4”;4、“2cdf5bf648cf2f33323966d7f58a7f3f”;5、“c9ccee2e6ea535a969eb3f532ad9fe89”;6、“e8e496c15ba93d81f6ea4fe5f55a2244”;7、“3f1c4e4b6b16bbbd69b2ee476dc4f83a”;8、“2b0b25ff593c5b6c03403dd6234ffb2c”。<\/p><\/blockquote>\n<p><img src=\"https:\/\/img.php.cn\/upload\/article\/202112\/17\/2021121711215988732.jpg\" alt=\"What are the head tags of html5\" ><\/p>\n<p>本教程操作环境:windows7系统、HTML5版、Dell G3电脑。<\/p>\n<h2><strong>html5的头部标记<\/strong><\/h2>\n<p><strong>1、93f0f5c25f18dab9d176bd4f6de5d30e标签<\/strong><\/p>\n<p>93f0f5c25f18dab9d176bd4f6de5d30e 标签是所有头部标签的容器,这些头部标签用来定义有关 HTML 文档的元数据(描述数据的数据)以及所需资源的引用(例如 CSS 样式文件、JavaScript 脚本文件),对文档能够在浏览器中正确显示起到了非常重要的作用。根据我们的需求,可以在 HTML 头部定义大量的元数据,也可以定义很少或者根本就不定义。虽然头部标签是 HTML 文档的一部分,但其中的内容并不会显示在浏览器中。<\/p><pre class=\"brush:html;toolbar:false\"><head>\n    ....\n<\/head><\/pre><p><strong>2、b2386ffb911b14667cb8f0f91ea547a7 标签<\/strong><\/p>\n<p>b2386ffb911b14667cb8f0f91ea547a7 标签用来定义 HTML 文档的标题,只有包含 b2386ffb911b14667cb8f0f91ea547a7 标签的文档才算是一个有效的 HTML 文档。另外,一个 HTML 文档中仅允许存在一个 b2386ffb911b14667cb8f0f91ea547a7 标签,并且 b2386ffb911b14667cb8f0f91ea547a7 标签必须放置在 93f0f5c25f18dab9d176bd4f6de5d30e 标签中。<\/p>\n<p>注意,在 b2386ffb911b14667cb8f0f91ea547a7 标签内部仅允许包含纯文本内容,不能包含其他 HTML 标签。<\/p>\n<p>b2386ffb911b14667cb8f0f91ea547a7 标签的主要作用如下所示:<\/p>\n<ul style=\"list-style-type: disc;\">\n<li><p>在浏览器标题栏或者任务栏中显示标题;<\/p><\/li>\n<li><p>当将页面添加到收藏夹(书签)时提供标题;<\/p><\/li>\n<li><p>在搜索结果中显示页面标题。<\/p><\/li>\n<\/ul>\n<p>下面的示例演示了如何在 HTML 文档中使用 b2386ffb911b14667cb8f0f91ea547a7 标签:<\/p><pre class=\"brush:html;toolbar:false\"><head>\n    <meta charset=\"utf-8\">\n    <title>php中文网-教程_手册_视频-免费php在线学习平台<\/title>\n<\/head><\/pre><p>b2386ffb911b14667cb8f0f91ea547a7 标签的内容必须与当前文档有关,并且不应该过长,中文页面请尽量控制在 30 个字符(包括空格)以内。<\/p>\n<p><strong>3、dde6fb694e6711ae5e6f381704c04ae4 标签<\/strong><\/p>\n<p>dde6fb694e6711ae5e6f381704c04ae4 标签用于为页面中所有相对链接指定一个基本链接,当您设置了基本链接后,当前页面中的所有相对链接都会使用这个基本链接作为前缀,如下例所示:<\/p><pre class=\"brush:html;toolbar:false\"><!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <title><base>标签演示<\/title>\n    <base href=\"https:\/\/www.php.cn\/\">\n<\/head>\n<body>\n    <ul>\n        <li><a href=\"course.html\">视频教程<\/a><\/li>\n        <li><a href=\"course\/type\/3.html\">入门教程<\/a><\/li>\n    <\/ul>\n<\/body>\n<\/html><\/pre><p>上面的示例中第一个 25edfb22a4f469ecb59f1190150159c6 标签中的超链接会被解析为“https:\/\/www.php.cn\/course.html”,第二个 25edfb22a4f469ecb59f1190150159c6 中的超链接会被解析为“https:\/\/www.php.cn\/course\/type\/3.html”。<\/p>\n<p>注意,HTML 文档中的 dde6fb694e6711ae5e6f381704c04ae4 标签必须出现在任何引用外部资源的标签之前,而且一个 HTML 文档中仅允许定义一个 dde6fb694e6711ae5e6f381704c04ae4 标签。<\/p>\n<p><strong>4、2cdf5bf648cf2f33323966d7f58a7f3f 标签<\/strong><\/p>\n<p>2cdf5bf648cf2f33323966d7f58a7f3f 标签经常用于引用外部 CSS 样式表,2cdf5bf648cf2f33323966d7f58a7f3f 标签中包含两个主要的属性,分别是 rel 和 href。rel 属性用来指示引用文件的类型,href 属性用来设置外部文件的路径。示例代码如下:<\/p><pre class=\"brush:html;toolbar:false\"><head>\n    <title>此处书写标题<\/title>\n    <link rel=\"stylesheet\" href=\"common.css\">\n<\/head><\/pre><p>HTML 93f0f5c25f18dab9d176bd4f6de5d30e 标签中可以包含任意数量的 2cdf5bf648cf2f33323966d7f58a7f3f 标签。<\/p>\n<p><strong>5、c9ccee2e6ea535a969eb3f532ad9fe89标签<\/strong><\/p>\n<p>使用 c9ccee2e6ea535a969eb3f532ad9fe89 标签可以在 HTML 文档中嵌入 CSS 样式,需要注意的是在 c9ccee2e6ea535a969eb3f532ad9fe89 标签中定义的样式仅对当前 HTML 文档有效。示例代码如下:<\/p><pre class=\"brush:html;toolbar:false\"><head>\n    <title>此处书写标题<\/title>\n    <style>\n        body { background-color: YellowGreen; }\n        h1 { color: red; }\n        p { color: green; }\n    <\/style>\n<\/head><\/pre><p>注意:对于文档中的唯一样式可以使用 c9ccee2e6ea535a969eb3f532ad9fe89 标签,但对于在多个文档中通用的样式,使用外部样式表更为合适。关于在 HTML 中嵌入 CSS 的更多内容,请转到《HTML嵌入CSS样式(四种方法)》。<\/p>\n<p><strong>6、e8e496c15ba93d81f6ea4fe5f55a2244 标签<\/strong><\/p>\n<p>e8e496c15ba93d81f6ea4fe5f55a2244 标签用于提供有关 HTML 文档的元数据,例如页面有效期、页面作者、关键字列表、页面描述等信息。e8e496c15ba93d81f6ea4fe5f55a2244 标签定义的数据并不会显示在页面上,但却会被浏览器解析。<\/p>\n<p>1) 定义字符集<\/p><pre class=\"brush:html;toolbar:false\"><meta charset=\"UTF-8\"><\/pre><p>charset 属性用来指定 HTML 文档的字符编码,上面的示例中,我们将文档的字符编码设置为了“UTF-8”。<\/p>\n<p>2) 定义页面描述<\/p><pre class=\"brush:html;toolbar:false\"><meta name=\"description\" content=\"php中文网提供大量免费、原创、高清的php视频教程,并定期举行公益php培训!可边学习边在线修改示例代码,查看执行效果!php从入门到精通,一站式php自学平台!\"><\/pre><p>定义页面的描述信息有利于搜索引擎的搜索。<\/p>\n<blockquote><p>b2386ffb911b14667cb8f0f91ea547a7 标签定义文档标题,name=\"description\" 定义文档描述,描述的长度通常大于标题。<\/p><\/blockquote>\n<p>3) 定义关键字<\/p><pre class=\"brush:html;toolbar:false\"><meta name=\"keywords\" content=\"php教程,php入门教程,php视频教程,php源码下载,php手册\"><\/pre><p>关键字用于为搜索引擎提供与页面有关的信息。<\/p>\n<p>4) 定义页面作者<\/p><pre class=\"brush:html;toolbar:false\"><meta name=\"author\" content=\"PHP中文网\"><\/pre><p>通过某些内容管理系统可以自动提取作者信息。<\/p>\n<p>5) 刷新页面<\/p><pre class=\"brush:html;toolbar:false;\"><meta http-equiv=\"refresh\" content=\"30\"><\/pre><p>上例中的代码用于向浏览器发送一个指令,使浏览器在经过指定的时间间隔(30 秒)后自动刷新页面。在 content 属性中除了可以指定时间间隔外,还可以再指定一个链接,这时页面将在指定的时间后重定向到链接所指向的页面,如下例所示:<\/p><pre class=\"brush:html;toolbar:false\"><meta http-equiv=\"refresh\" content=\"10; url=https:\/\/www.php.cn\/\"><\/pre><p><strong>7、3f1c4e4b6b16bbbd69b2ee476dc4f83a 标签<\/strong><\/p>\n<p>3f1c4e4b6b16bbbd69b2ee476dc4f83a 标签用于定义 JavaScript 脚本,示例代码如下:<\/p><pre class=\"brush:html;toolbar:false\"><head>\n    <title>PHP中文网<\/title>\n    <script>\n        document.write(\"PHP中文网\")\n    <\/script>\n<\/head><\/pre><p><strong>8、2b0b25ff593c5b6c03403dd6234ffb2c 标签<\/strong><\/p>\n<p>当用户的浏览器不支持 JavaScript 脚本或者禁用 JavaScript 脚本时,可以在 2b0b25ff593c5b6c03403dd6234ffb2c 标签中定义一些内容来替代不能运行的 JavaScript 脚本或者给用户一些提示。除了 3f1c4e4b6b16bbbd69b2ee476dc4f83a 标签外,在 2b0b25ff593c5b6c03403dd6234ffb2c 标签中可以包含任何 HTML 元素,如下例所示:<\/p><pre class=\"brush:html;toolbar:false\"><head>\n    <title>PHP中文网<\/title>\n    <noscript>\n        <p>您的浏览器不支持 JavaScript 或者您禁用了 JavaScript,请<a href=\"https:\/\/www.php.cn\/\">点击这里<\/a>了解如何启用 JavaScript。<\/p>\n    <\/noscript>\n<\/head><\/pre><p>相关推荐:《<a href=\"http:\/\/www.php.cn\/course\/list\/11.html\" target=\"_blank\" textvalue=\"html视频教程\">html视频教程<\/a>》<\/p>"}</script><script type="application/ld+json"> [ { "@context":"https://schema.org", "@type":"BreadcrumbList", "itemListElement":[ { "@type":"ListItem", "position":1, "item":{"@id":"https://m.php.cn/", "name":"Home"} } ,{ "@type":"ListItem", "position":2, "item":{"@id":"https://m.php.cn/article.html", "name":"Technical Articles"} } ,{ "@type":"ListItem", "position":3, "item":{"@id":"https://m.php.cn/web-designer.html", "name":"Web Front-end"} } ,{ "@type":"ListItem", "position":4, "item":{"@id":"https://m.php.cn/faq/486099.html", "name":"What are the head tags of html5"} } ] } ] </script></head><body><div class="bodyBg"><link rel="stylesheet" type="text/css" href="/static/csshwm/m_stylehw.css"><header><div class="head"><div class="haed_left"><div class="haed_logo"><a href="https://m.php.cn/" title="php.cn" class="haed_logo_a"><img src="/static/imghwm/logo.png" alt="php.cn" class="haed_logoimg"></a></div></div><div class="search_div search_div_top2"><input id="key_words" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="" onkeydown="if (event.keyCode == 13) searchs('en')"/><a onclick="searchs('en')" href="javascript:;" title="search"><img onerror="this.onerror=''; this.src='static/imghwm/default1.png'" src="/static/imghwm/find.png" alt="search"></a></div><div class="head_right"><button type="button" class="layui-btn layui-btn-primary headerlan headlanmax lan1" id="lan1sp" lay-on="test-offset-r"><img src="/static/imghwm/m_menu.png" alt=""></button><div id="m_menu" class="m_menu" style="display: none;"><div class="m_editormain12main_top"><img src="/static/imghwm/logo.png" alt="logo"><a href="javascript:;" class="m_editormain12main_topi" id="m_editormain12main_topi_sp"><i class="layui-icon layui-icon-close"></i></a></div><div class="layui-panel m_menu_main"><ul class="layui-menu" id="demo-menu"><li class="layui-menu-item-group layui-menu-item-up m_menus" lay-options="{type: 'group'}"><div class="layui-menu-body-title m_menus_title">Community<i class="layui-icon layui-icon-down"></i></div><ul class="m_menusnames"><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/article.html" title="Articles">Articles</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/faq/zt" title="Topics">Topics</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/wenda.html" title="Q&A">Q&A</a></div></li></ul></li><li class="layui-menu-item-divider"></li><li class="layui-menu-item-group layui-menu-item-up m_menus" lay-options="{type: 'group'}"><div class="layui-menu-body-title m_menus_title">Learn<i class="layui-icon layui-icon-down"></i></div><ul class="m_menusnames"><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/course.html" title="Course">Course</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/dic/" title="Programming Dictionary">Programming Dictionary</a></div></li></ul></li><li class="layui-menu-item-divider"></li><li class="layui-menu-item-group layui-menu-item-up m_menus" lay-options="{type: 'group'}"><div class="layui-menu-body-title m_menus_title">Tools Library<i class="layui-icon layui-icon-down"></i></div><ul class="m_menusnames"><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/toolset/development-tools" title="Development tools">Development tools</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/toolset/website-source-code" title="Website Source Code">Website Source Code</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/toolset/php-libraries" title="PHP Libraries">PHP Libraries</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/toolset/js-special-effects" title="JS special effects">JS special effects</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/toolset/website-materials" title="Website Materials">Website Materials</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/toolset/extension-plug-ins" title="Extension plug-ins">Extension plug-ins</a></div></li></ul></li><li class="layui-menu-item-divider"></li><li class="layui-menu-item-group layui-menu-item-up m_menus" lay-options="{type: 'group'}"><div class="layui-menu-body-title m_menus_title">Leisure<i class="layui-icon layui-icon-down"></i></div><ul class="m_menusnames"><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/game" title="Game Download">Game Download</a></div></li><li><div class="layui-menu-body-title m_menus_name"><a href="https://m.php.cn/mobile-game-tutorial/" title="Game Tutorials">Game Tutorials</a></div></li></ul></li><li class="layui-menu-item-divider"></li></ul></div><!-- <div class="m_menu_button">--><!-- <a href="javascript:;" title="singup">Create an account</a>--><!-- </div>--><div class="m_menu_button m_menu_button_login"><a href="https://m.php.cn/login" title="Login">Log in</a></div><div class="m_menu_button m_menu_button_lang"><button type="button" class="layui-btn layui-btn-primary headerlan headlanmax lan1" id="lan1" lay-on="page2">English<i class="layui-icon layui-icon-triangle-d"></i></button></div></div><div class="m_menu_lang" id="m_menu_lang" style="display: none;"><div class="m_editormain12main_top"><img src="/static/imghwm/logo.png" alt="logo"><a href="javascript:;" class="m_editormain12main_topi" id="m_editormain12main_topi_lan"><i class="layui-icon layui-icon-close"></i></a></div><div class="m_menu_lang_main"><a href="javascript:setlang('zh-cn');" class="m_menu_lang_mains">简体中文<span>zh-cn</span></a><a href="javascript:;" class="m_menu_lang_mains">English<span>en</span></a><a href="javascript:setlang('zh-tw');" class="m_menu_lang_mains">繁体中文<span>zh-tw</span></a><a href="javascript:setlang('ja');" class="m_menu_lang_mains">日本語<span>ja</span></a><a href="javascript:setlang('ko');" class="m_menu_lang_mains">한국어<span>ko</span></a><a href="javascript:setlang('ms');" class="m_menu_lang_mains">Melayu<span>ms</span></a><a href="javascript:setlang('fr');" class="m_menu_lang_mains">Français<span>fr</span></a><a href="javascript:setlang('de');" class="m_menu_lang_mains">Deutsch<span>de</span></a></div></div></div></div></header><script> document.getElementById('lan1sp').addEventListener('click', function (event) { event.preventDefault(); var elements = document.getElementsByClassName('m_menu'); for (var i = 0; i < elements.length; i++) { elements[i].style.display = 'block'; } }); document.getElementById('m_editormain12main_topi_sp').addEventListener('click', function (event) { event.preventDefault(); var elements = document.getElementsByClassName('m_menu'); for (var i = 0; i < elements.length; i++) { elements[i].style.display = 'none'; } }); document.getElementById('lan1').addEventListener('click', function (event) { event.preventDefault(); var elements = document.getElementsByClassName('m_menu_lang'); for (var i = 0; i < elements.length; i++) { elements[i].style.display = 'block'; } }); document.getElementById('m_editormain12main_topi_lan').addEventListener('click', function (event) { event.preventDefault(); var elements = document.getElementsByClassName('m_menu_lang'); for (var i = 0; i < elements.length; i++) { elements[i].style.display = 'none'; } }); </script><div class="bodyMain"><!--所在位置--><div class="nphpSize"><div class="nphpSizeIn"><b></b><p><a href="https://m.php.cn/" title="Home" class="bBlack">Home</a>  >  <a href="https://m.php.cn/article.html" title="Article" class="bBlack">Article</a>  >  <a href="https://m.php.cn/web-designer.html" class="cBlack">Web Front-end</a>  >  What are the head tags of html5</p><!-- <p><a href="https://m.php.cn/article.html" class="cBlack">Technical Articles</a>  >  <a href="https://m.php.cn/web-designer.html" class="cBlack">Web Front-end</a> > <a href="https://m.php.cn/website-design-ask.html" class="cBlack">Front-end Q&A</a> > What are the head tags of html5</p> --><div class="clear"></div></div></div><div class="nphpQianBox"><div class="nphpQianTitle"><h1>What are the head tags of html5</h1><div class="nphpQianTitleIn"><span><img data-src="https://img.php.cn/upload/avatar/000/287/557/5bef70171e9f3249.jpg" alt="青灯夜游" class="lazyload" src="/static/front/mobimages/moren/moren.png" /></span><dl><dt><em>青灯夜游</em><i class='bg1'>Original</i><div class="clear"></div></dt><dd><em>2021-12-17 11:24:47</em><i>6178browse</i><div class="clear"></div></dd></dl><div class="clear"></div></div></div><div class="nphpQianCont wenda-list"><blockquote><p>html5的头部标记有:1、“93f0f5c25f18dab9d176bd4f6de5d30e”;2、“b2386ffb911b14667cb8f0f91ea547a7”;3、“dde6fb694e6711ae5e6f381704c04ae4”;4、“2cdf5bf648cf2f33323966d7f58a7f3f”;5、“c9ccee2e6ea535a969eb3f532ad9fe89”;6、“e8e496c15ba93d81f6ea4fe5f55a2244”;7、“3f1c4e4b6b16bbbd69b2ee476dc4f83a”;8、“2b0b25ff593c5b6c03403dd6234ffb2c”。</p></blockquote> <p><img src="https://img.php.cn/upload/article/202112/17/2021121711215988732.jpg" alt="What are the head tags of html5" ></p> <p>本教程操作环境:windows7系统、HTML5版、Dell G3电脑。</p> <h2><strong>html5的头部标记</strong></h2> <p><strong>1、93f0f5c25f18dab9d176bd4f6de5d30e标签</strong></p> <p>93f0f5c25f18dab9d176bd4f6de5d30e 标签是所有头部标签的容器,这些头部标签用来定义有关 HTML 文档的元数据(描述数据的数据)以及所需资源的引用(例如 CSS 样式文件、JavaScript 脚本文件),对文档能够在浏览器中正确显示起到了非常重要的作用。根据我们的需求,可以在 HTML 头部定义大量的元数据,也可以定义很少或者根本就不定义。虽然头部标签是 HTML 文档的一部分,但其中的内容并不会显示在浏览器中。</p><pre class="brush:html;toolbar:false"><head> .... </head></pre><p><strong>2、b2386ffb911b14667cb8f0f91ea547a7 标签</strong></p> <p>b2386ffb911b14667cb8f0f91ea547a7 标签用来定义 HTML 文档的标题,只有包含 b2386ffb911b14667cb8f0f91ea547a7 标签的文档才算是一个有效的 HTML 文档。另外,一个 HTML 文档中仅允许存在一个 b2386ffb911b14667cb8f0f91ea547a7 标签,并且 b2386ffb911b14667cb8f0f91ea547a7 标签必须放置在 93f0f5c25f18dab9d176bd4f6de5d30e 标签中。</p> <p>注意,在 b2386ffb911b14667cb8f0f91ea547a7 标签内部仅允许包含纯文本内容,不能包含其他 HTML 标签。</p> <p>b2386ffb911b14667cb8f0f91ea547a7 标签的主要作用如下所示:</p> <ul style="list-style-type: disc;"> <li><p>在浏览器标题栏或者任务栏中显示标题;</p></li> <li><p>当将页面添加到收藏夹(书签)时提供标题;</p></li> <li><p>在搜索结果中显示页面标题。</p></li> </ul> <p>下面的示例演示了如何在 HTML 文档中使用 b2386ffb911b14667cb8f0f91ea547a7 标签:</p><pre class="brush:html;toolbar:false"><head> <meta charset="utf-8"> <title>php中文网-教程_手册_视频-免费php在线学习平台</title> </head></pre><p>b2386ffb911b14667cb8f0f91ea547a7 标签的内容必须与当前文档有关,并且不应该过长,中文页面请尽量控制在 30 个字符(包括空格)以内。</p> <p><strong>3、dde6fb694e6711ae5e6f381704c04ae4 标签</strong></p> <p>dde6fb694e6711ae5e6f381704c04ae4 标签用于为页面中所有相对链接指定一个基本链接,当您设置了基本链接后,当前页面中的所有相对链接都会使用这个基本链接作为前缀,如下例所示:</p><pre class="brush:html;toolbar:false"><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>&lt;base&gt;标签演示</title> <base href="https://www.php.cn/"> </head> <body> <ul> <li><a href="course.html">视频教程</a></li> <li><a href="course/type/3.html">入门教程</a></li> </ul> </body> </html></pre><p>上面的示例中第一个 25edfb22a4f469ecb59f1190150159c6 标签中的超链接会被解析为“https://www.php.cn/course.html”,第二个 25edfb22a4f469ecb59f1190150159c6 中的超链接会被解析为“https://www.php.cn/course/type/3.html”。</p> <p>注意,HTML 文档中的 dde6fb694e6711ae5e6f381704c04ae4 标签必须出现在任何引用外部资源的标签之前,而且一个 HTML 文档中仅允许定义一个 dde6fb694e6711ae5e6f381704c04ae4 标签。</p> <p><strong>4、2cdf5bf648cf2f33323966d7f58a7f3f 标签</strong></p> <p>2cdf5bf648cf2f33323966d7f58a7f3f 标签经常用于引用外部 CSS 样式表,2cdf5bf648cf2f33323966d7f58a7f3f 标签中包含两个主要的属性,分别是 rel 和 href。rel 属性用来指示引用文件的类型,href 属性用来设置外部文件的路径。示例代码如下:</p><pre class="brush:html;toolbar:false"><head> <title>此处书写标题</title> <link rel="stylesheet" href="common.css"> </head></pre><p>HTML 93f0f5c25f18dab9d176bd4f6de5d30e 标签中可以包含任意数量的 2cdf5bf648cf2f33323966d7f58a7f3f 标签。</p> <p><strong>5、c9ccee2e6ea535a969eb3f532ad9fe89标签</strong></p> <p>使用 c9ccee2e6ea535a969eb3f532ad9fe89 标签可以在 HTML 文档中嵌入 CSS 样式,需要注意的是在 c9ccee2e6ea535a969eb3f532ad9fe89 标签中定义的样式仅对当前 HTML 文档有效。示例代码如下:</p><pre class="brush:html;toolbar:false"><head> <title>此处书写标题</title> <style> body { background-color: YellowGreen; } h1 { color: red; } p { color: green; } </style> </head></pre><p>注意:对于文档中的唯一样式可以使用 c9ccee2e6ea535a969eb3f532ad9fe89 标签,但对于在多个文档中通用的样式,使用外部样式表更为合适。关于在 HTML 中嵌入 CSS 的更多内容,请转到《HTML嵌入CSS样式(四种方法)》。</p> <p><strong>6、e8e496c15ba93d81f6ea4fe5f55a2244 标签</strong></p> <p>e8e496c15ba93d81f6ea4fe5f55a2244 标签用于提供有关 HTML 文档的元数据,例如页面有效期、页面作者、关键字列表、页面描述等信息。e8e496c15ba93d81f6ea4fe5f55a2244 标签定义的数据并不会显示在页面上,但却会被浏览器解析。</p> <p>1) 定义字符集</p><pre class="brush:html;toolbar:false"><meta charset="UTF-8"></pre><p>charset 属性用来指定 HTML 文档的字符编码,上面的示例中,我们将文档的字符编码设置为了“UTF-8”。</p> <p>2) 定义页面描述</p><pre class="brush:html;toolbar:false"><meta name="description" content="php中文网提供大量免费、原创、高清的php视频教程,并定期举行公益php培训!可边学习边在线修改示例代码,查看执行效果!php从入门到精通,一站式php自学平台!"></pre><p>定义页面的描述信息有利于搜索引擎的搜索。</p> <blockquote><p>b2386ffb911b14667cb8f0f91ea547a7 标签定义文档标题,name="description" 定义文档描述,描述的长度通常大于标题。</p></blockquote> <p>3) 定义关键字</p><pre class="brush:html;toolbar:false"><meta name="keywords" content="php教程,php入门教程,php视频教程,php源码下载,php手册"></pre><p>关键字用于为搜索引擎提供与页面有关的信息。</p> <p>4) 定义页面作者</p><pre class="brush:html;toolbar:false"><meta name="author" content="PHP中文网"></pre><p>通过某些内容管理系统可以自动提取作者信息。</p> <p>5) 刷新页面</p><pre class="brush:html;toolbar:false;"><meta http-equiv="refresh" content="30"></pre><p>上例中的代码用于向浏览器发送一个指令,使浏览器在经过指定的时间间隔(30 秒)后自动刷新页面。在 content 属性中除了可以指定时间间隔外,还可以再指定一个链接,这时页面将在指定的时间后重定向到链接所指向的页面,如下例所示:</p><pre class="brush:html;toolbar:false"><meta http-equiv="refresh" content="10; url=https://www.php.cn/"></pre><p><strong>7、3f1c4e4b6b16bbbd69b2ee476dc4f83a 标签</strong></p> <p>3f1c4e4b6b16bbbd69b2ee476dc4f83a 标签用于定义 JavaScript 脚本,示例代码如下:</p><pre class="brush:html;toolbar:false"><head> <title>PHP中文网</title> <script> document.write("PHP中文网") </script> </head></pre><p><strong>8、2b0b25ff593c5b6c03403dd6234ffb2c 标签</strong></p> <p>当用户的浏览器不支持 JavaScript 脚本或者禁用 JavaScript 脚本时,可以在 2b0b25ff593c5b6c03403dd6234ffb2c 标签中定义一些内容来替代不能运行的 JavaScript 脚本或者给用户一些提示。除了 3f1c4e4b6b16bbbd69b2ee476dc4f83a 标签外,在 2b0b25ff593c5b6c03403dd6234ffb2c 标签中可以包含任何 HTML 元素,如下例所示:</p><pre class="brush:html;toolbar:false"><head> <title>PHP中文网</title> <noscript> <p>您的浏览器不支持 JavaScript 或者您禁用了 JavaScript,请<a href="https://www.php.cn/">点击这里</a>了解如何启用 JavaScript。</p> </noscript> </head></pre><p>相关推荐:《<a href="http://www.php.cn/course/list/11.html" target="_blank" textvalue="html视频教程">html视频教程</a>》</p><p>The above is the detailed content of What are the head tags of html5. For more information, please follow other related articles on the PHP Chinese website!</p></div><div class="nphpQianMsg"><a href="javascript:void(0);">php</a> <a href="javascript:void(0);">JavaScript</a> <a href="javascript:void(0);">html5</a> <a href="javascript:void(0);">css</a> <a href="javascript:void(0);">html</a> <a href="javascript:void(0);">href</a> <a href="javascript:void(0);">样式表</a> <a href="javascript:void(0);">li</a> <a href="javascript:void(0);">https</a> <a href="javascript:void(0);">搜索引擎</a><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="what is ajax function" href="https://m.php.cn/faq/486098.html">what is ajax function</a></span><span>Next article:<a class="dBlack" title="what is ajax function" href="https://m.php.cn/faq/486100.html">what is ajax function</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="https://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="https://m.php.cn/faq/486056.html" title="What are the interactive elements of html5 pages?" class="aBlack">What are the interactive elements of html5 pages?</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/486084.html" title="How to invalidate a piece of code in html5" class="aBlack">How to invalidate a piece of code in html5</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/486088.html" title="How to limit the number of input numbers in html5" class="aBlack">How to limit the number of input numbers in html5</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/486091.html" title="Which code is used to set the background color in html5" class="aBlack">Which code is used to set the background color in html5</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/486093.html" title="What is the code to move the html5 image to the right?" class="aBlack">What is the code to move the html5 image to the right?</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/486095.html" title="Is li a single tag in HTML5?" class="aBlack">Is li a single tag in HTML5?</a><div class="clear"></div></li></ul></div></div><footer><div class="footer"><div class="footertop"><img src="/static/imghwm/logo.png" alt=""><p>Public welfare online PHP training,Help PHP learners grow quickly!</p></div><div class="footermid"><a href="https://m.php.cn/about/us.html">About us</a><a href="https://m.php.cn/about/disclaimer.html">Disclaimer</a><a href="https://m.php.cn/update/article_0_1.html">Sitemap</a></div><div class="footerbottom"><p> © php.cn All rights reserved </p></div></div></footer><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>