<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                頭標簽都放在<head></head>頭部分之間。包括:title標簽,base標簽,meta標簽,link標簽,style標簽和script 標簽(這個標簽也可以放在體部分中)。 ### 一,<title>標簽 <title></tilte>是成對出現的,作用是顯示網頁標題,指定瀏覽器的標題欄顯示的內容。是head標簽中唯一要求包 含的東西。 ~~~ <html> <head> <title>這是我的第一個網頁</title> </head> <body> </body> </html> ~~~ 瀏覽器顯示的結果為: ![](https://box.kancloud.cn/2016-04-28_5721558a91154.jpg) ### 二,<link>標簽 link標簽必須置于head里,定義文檔與外部資源的關系。比如:鏈接樣式表,引入樣式文件。 href屬性:被鏈接文檔的地址。 rel屬性:描述當前文檔與被鏈接文檔的關系。 type屬性:規定被鏈接文檔的類型。 media屬性:指定被鏈接文檔在哪種設備上起作用,也就是顯示在什么設備上。 HTML代碼: ~~~ <html> <head> <title>這是我的第一個網頁</title> <link rel="stylesheet" style="text/css" href="a.css" /> </head> <body> <p>這是一個段落</p> </body> </html> ~~~ CSS代碼: ~~~ /* CSS Document */ p {background-color:#000000; color:#FF0000; } ~~~ 瀏覽器顯示的結果為: ![](https://box.kancloud.cn/2016-04-28_5721558aa10c1.jpg) 我們在這里再說一個外部延伸,就是設置地址欄圖片: 方法1:favicon.ico放置在網站的根目錄。一般適用于大中型網站。 方法2:放在head內,使用link標簽引入。一般適用于小型網站,個人博客等網站。 演示: ~~~ <html> <head> <title>這是我的第一個網頁</title> <link rel="stylesheet" style="text/css" href="a.css" /> <link rel="shortcut icon" type="imag/x-icon" href="5.jpg" /> </head> <body> <p>這是一個段落<p> </body> </html> ~~~ CSS代碼同上。 顯示結果為: ![](https://box.kancloud.cn/2016-04-28_5721558ab4d8c.jpg) ### 三,<base>標簽 必須置于head里。 href屬性:指定網頁中所有的超鏈接的目錄。可以是本地目錄,也可以是網絡目錄。注意值的結尾處一定要用/表 示目錄。只作用于相對路徑的超鏈接文件。定義默認鏈接地址。 target屬性:指定默認打開超鏈接的方式。如_blank表示所有的超鏈接都用新窗口打開顯示。 ~~~ <html> <head> <!--link標簽鏈接外部樣式表--> <link rel="stylesheet" type="text/css" href="a.css" /> <!--link標簽鏈接標題欄圖標--> <link rel="shortcut icon" type="imag/x-icon" href="5.jpg" /> <!--base標簽鏈接默認地址,指定默認打開方式--> <base href="https://www.baidu.com" target="_blank" /> <title>這是我的第一個網頁</title> </head> <body> <p>這是一個段落</p> <a href="">百度一下,你就知道</a> </body> </html> ~~~ 瀏覽器顯示的結果為: ![](https://box.kancloud.cn/2016-04-28_5721558ac5c98.jpg) ### 四,< meta>標簽: 必須置于head里,作用是提供有關頁面的元信息,其屬性定義了與文檔相關聯的名稱/值對。 ![](https://box.kancloud.cn/2016-04-28_5721558ad6e3c.jpg) http-equiv屬性:把content屬性關聯到HTTP頭部,模擬HTTP協議的響應消息頭。 ![](https://box.kancloud.cn/2016-04-28_5721558aea55c.jpg) 其他的關于http-equiv的內容: ![](https://box.kancloud.cn/2016-04-28_5721558b1745c.jpg) name屬性:把content屬性關聯到一個名稱,網頁的描述信息。當取keywords時,content屬性的內容就作為搜 素引擎的關鍵字進行搜索。 ![](https://box.kancloud.cn/2016-04-28_5721558b31670.jpg) 示例圖片: ![](https://box.kancloud.cn/2016-04-28_5721558b47dc4.jpg) scheme屬性:定義用于翻譯content屬性值的格式,這個不常用。 以上的總的HTML代碼: ~~~ <html> <head> <!--指定網頁文檔解析為中文--> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <!--指定5秒后頁面跳轉到新浪網站--> <meta http-equiv="refresh" content="5;url='http://www.sina.com.cn/'" /> <!--下面兩個標簽是SEO搜素優化起到的作用,網站關鍵詞和網站描述--> <meta name="keywords" content="前端開發,Web開發,HTML" /> <meta name="description" content="演示網頁開發的文檔" /> <!--link標簽鏈接外部樣式表--> <link rel="stylesheet" type="text/css" href="a.css" /> <!--link標簽鏈接標題欄圖標--> <link rel="shortcut icon" type="imag/x-icon" href="5.jpg" /> <!--base標簽鏈接默認地址,指定默認打開方式--> <base href="https://www.baidu.com" target="_blank" /> <title>這是我的第一個網頁</title> </head> <body> <p>這是一個段落</p> <a href="">百度一下,你就知道</a> </body> </html> ~~~ 顯示結果為只有上傳到服務器端才有功能顯示,在SEO搜索優化的時候也會出現相應的內容。 ### 五,<style>標簽 置于head里,為HTML文檔定義樣式信息。這個我們在CSS中會具體地提到和講解。 style屬性: ![](https://box.kancloud.cn/2016-04-28_5721558b5bcbd.jpg) media常見的屬性: ![](https://box.kancloud.cn/2016-04-28_5721558b71532.jpg) HTNL代碼: ~~~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>標簽演示</title> <style type="text/css"> p {color:#0000FF; font-size:20px; </style> </head> <body> <p>這是一個段落</p> </body> </html> ~~~ 顯示結果為: ![](https://box.kancloud.cn/2016-04-28_5721558b85c0a.jpg) ### 六,<script>標簽: 可置于head里,也可以置于body里。定義客戶端腳本或者引入腳本。這個我們在JavaScript中具體的講解。 script的屬性內容: ![](https://box.kancloud.cn/2016-04-28_5721558b95f56.jpg) ~~~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>標簽演示</title> <script type="text/javascript"> alert('hello'); </script>> </head> <body> </body> </html> ~~~ 顯示結果為: ![](https://box.kancloud.cn/2016-04-28_5721558bb728f.jpg) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看