Home  >  Article  >  Web Front-end  >  Html笔记(九)头标签_html/css_WEB-ITnose

Html笔记(九)头标签_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:34:21730browse

头标签:

头标签都放在

头部分之间。包括:title base meta link

:指定浏览器的标题栏显示的内容。 <p><base> :</p> <p>href 属性:指定网页中所有的超链接的目录。可以是本地目录,也可以是网络目录,注意值的结尾处一定要用 \ 表示目录。只作用于相对路径的超链接文件。</p> <p>target 属性:指定打开超链接的方式。如 _blank 表示所有的超链接都用新窗口打开显示。</p> <p><meta> :</p> <p>name 属性:网页的描述信息。当取 keywords 时,content 属性的内容就作为搜索引擎的关键字进行搜索。</p> <p>http-equiv 属性:模拟HTTP协议的响应消息头。</p> <p><link> :</p> <p>rel 属性:描述目标文档与当前文档的关系。</p> <p>type 属性:文档类型。</p> <p>media 属性:指定目标文档在哪种设备上起作用</p> <p>例子:</p> <p class="sycode"> <pre class="sycode" name="code"> <p class="sycode"> 1 < head > 2 3 < title > 我的网页 </ title > 4 5 < base href ="d:\code\myhtml\" /> <!-- 链接的根目录 --> 6 7 < meta http-equiv ="keywords" content ="Shawn" /> <!-- 网页关键字为Shawn --> 8 < meta http-equiv ="refresh" content ="3" /> <!-- 3秒刷新一次 --> 9 < meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" /> 10 11 < link rel ="stylesheet" href ="1.css" media ="print,screen" /> 12 <!-- 关联一个css样式文件 --> 13 14 </ head > 15 16 < body > 17 < a href ="pic.jpg" > PIC </ a > 18 </ body > </p></pre> </p>
Statement:
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