Header tags:
Header tags are placed between the
header parts. Includes: title base meta linkhref attribute: Specifies the directory of all hyperlinks in the web page. It can be a local directory or a network directory. Note that the directory must be represented by at the end of the value. Only works on hyperlinked files with relative paths.
target attribute: Specifies how to open a hyperlink. For example, _blank means that all hyperlinks are opened and displayed in new windows.
:
name attribute: description information of the web page. When keywords is taken, the content of the content attribute is used as the search engine's keywords for searching.
http-equiv attribute: simulates the response header of the HTTP protocol.
:
rel attribute: Describes the relationship between the target document and the current document.
type attribute: document type.
media attribute: Specify which device the target document works on
Example:
<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>