Hyperlink tag a anchor
<a href="http://baidu.com"> 百度 </a> 文字链接<a href="http://sina.com"> <img src=""> 图片链接</a><a href="mailto:[email protected]">请联系我[email protected]</a> 邮箱链接 (了解)<a href="a.zip">下载</a> (了解)
Note
1. The hyperlink is opened by the current page by default
Related attributes of base
href: set the address of the open page
target: set the way to open the hyperlink
- Open _self on this page (default way)
- Open _blank in a new page
base tag
base标签 只能写在head标签内部
href=“” 设置a链接的统一地址
target="" 将界面的a链接统一设置成为新建页打开
<base href="./4-锚点链接.html" target="_blank">
Anchor link
Link to a certain part of an interface (Identify-"Anchor Point)
1. Define the anchor point (the name of the part to be linked ) in the a link href attribute.
Rule: unique identification #anchor point English letters
2. Set your anchor to the corresponding jump part id = "anchor name"
<a href="#first">西游记</a>
<a href="#second">水浒传</a>
<a href="#third">红楼梦</a>
<a href="#forth">三国演义</a>