链接标签
格式
<a href="path" target="目标窗口位置">链接文本或图像</a> <!--href:链接路径--> <!--target:链接在哪个窗口打开 常用值:_self、_blank--> <!--_self:当前窗口打开--> <!--_blank:新建窗口打开
超链接
页面间链接
从一个页面链接到另一个页面
文本超链接
<a href="图像标签.html">点我跳转到图像标签</a><br> <a href="https://www.baidu.com">点我跳转到百度</a>
图像超链接
<a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a>
锚链接
-
需要一个锚标记
<a name="top">顶部</a> <!--使用name作为标记-->
-
跳转到标记
<a href="#top">回到顶部</a>
<a name="top">顶部</a><br> <a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <p><a href="https://www.baidu.com"> <img src="../resourse/1.jpg" alt="菜单" title="hello" width="100" height="100"> <!--../表示上一级目录--> </a></p> <a href="#top">点我回到顶部</a>
<a href="图像标签.html#down">点我跳转到图像标签</a><br>
功能性链接
邮箱链接:mailto
<a href="mailto:2805487978@qq.com">点击联系我</a>
QQ链接
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=&site=qq&menu=yes"> <img border="0" src="http://wpa.qq.com/pa?p=2::52" alt="点击这里给我发消息" title="点击这里给我发消息"/> </a>