HTML中的链接标签

链接标签

格式

<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>

锚链接

  1. 需要一个锚标记

    <a name="top">顶部</a>
    <!--使用name作为标记-->
  2. 跳转到标记

    <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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值