# head 元素包含了所有的頭部標籤元素,可以添加在頭部區域的元素標籤為: 、、<meta>、<link>、<script> ;、<noscript>、<base></span></span></p> <p><span style="font-size: 14pt; font-family: 'Microsoft YaHei';"><span style="font-size: 16px;"># 下面將一一解釋各標籤的功能</span></span></p> <p> <strong><span style="font-size: 14pt;"><span style="font-size: 16px;"><title></span></span></strong></p> <ol class=" list-paddingleft-2"> <li><p><span style="font-size: 14pt; font-family: 'Microsoft YaHei';"><span style="font-size: 16px;">#用於定義不同文件的標題</span> </span></p></li> <li><p><span style="font-size: 14pt; font-family: 'Microsoft YaHei';"><span style="font-size: 16px;">定義瀏覽器工具列的標題</span></span></p></li> <li><p><span style="font-size: 14pt; font-family: 'Microsoft YaHei';"><span style="font-size: 16px;">當網頁加入到收藏夾,顯示在收藏夾中的標題</span></span></p></li> <li><p><span style="font-size: 14pt; font-family: 'Microsoft YaHei';"><span style="font-size: 16px;">#顯示在搜尋引擎結果頁面的標題</span></span></p></li> </ol> <p class="cnblogs_code"><br></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:html;toolbar:false;"> eg: <title> 我是标题 </title></pre><div class="contentsignin">登入後複製</div></div><h3 class="public-p-title"><span style="font-size: 16px;">#<base></span></h3><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="public-pre"><span style="font-size: 15px;"><span style="font-family: 'Microsoft YaHei';"> 标签描述了基本的链接地址/链接目标,该标签作为HTML文档中所有的链接标签的默认链接。</span><br/></span></pre><div class="contentsignin">登入後複製</div></div><p class="cnblogs_code"><br/></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:html;toolbar:false;"> eg: <base href="www.beck.ren/images/" target="_blank"></base></pre><div class="contentsignin">登入後複製</div></div> <h3 class="public-p-title"><span style="font-size: 16px;"><link></span></h3><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="public-pre"> 标签定义了文档与外部资源之间的关系,通常用于链接样式表。</pre><div class="contentsignin">登入後複製</div></div><p class="cnblogs_code"><br/></p>#<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:html;toolbar:false;"> eg: <link type="text/css" href="../index.css"></pre><div class="contentsignin">登入後複製</div></div><h3 class="public-p-title"><span style="font-size: 16px;"><style></span></h3><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="public-pre"> 标签定义了HTML文档的样式文件引用地址.内容指定样式渲染HTML文档</pre><div class="contentsignin">登入後複製</div></div><p class="cnblogs_code"><br/></p>##<style><ol class=" list-paddingleft-2"><li><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:html;toolbar:false;">eg: <style> *{ margin:0; padding: 0; } <style> //css写法</pre><div class="contentsignin">登入後複製</div></div><p><span style="font-family: 'Microsoft YaHei';"> <span style="font-size: 16px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="public-pre"><meta></pre><div class="contentsignin">登入後複製</div></div><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:js;toolbar:false;">eg: //定义关键字 <meta name="keywords content="HTML, CSS, XML, XHTML, JavaScript""> //定义描述内容 <meta name="description" content="Free Web tutorials on HTML and CSS"> //定义作者 <meta name="author" content="Hege Refsnes"> //定义每30秒刷新当前页面 <meta http-equiv="refresh" content="30"></pre><div class="contentsignin">登入後複製</div></div></span><span style="font-size: 15px;"><span style="font-size: 16px;"><strong><br/>meta 標籤描述基本的元資料</strong></span></span></span></p></li><li><p> <span style="font-size: 16px; font-family: 'Microsoft YaHei';"></span></p></li><li><p>瀏覽器會解析標籤提供的元資料,但元資料不會顯示在頁面上<span style="font-size: 16px; font-family: 'Microsoft YaHei';"></span></p></li><li><p>meta 元素通常用於指定網頁的"描述"、"關鍵字"、"檔案的最後修改時間"、"作者"、......<span style="font-size: 16px; font-family: 'Microsoft YaHei';"></span></p></li></ol><p class="cnblogs_code">元資料可以告訴瀏覽器(如何顯示內容或重新載入頁面)及搜尋引擎(關鍵字),及其他web 服務<br/></p><h3 class="public-p-title"><span style="font-size: 16px;"></span> </h3><p class="cnblogs_code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="public-pre"> 标签定义了 HTML 文档的 JS 文件引用地址.</pre><div class="contentsignin">登入後複製</div></div><br/></p><script>######<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:js;toolbar:false;">eg: <script src="loading.js"></script></pre><div class="contentsignin">登入後複製</div></div>#########rrreee