HTML 超链接

1.如何创建html超链接

<html>
<body>
<p>
<a href="http://www.baidu.com" > website link</a>
</p>
  </body>
</html>

点击后跳转到baidu主页


2.超链接的title属性

<html>
<body>
<p>
<a href="http://www.baidu.com" title="click here to Baidu" > website link</a>
</p>
  </body>
</html>



3.将图片作为超链接

<html>
<body>
<p>
<a href="http://www.baidu.com"> 
<img src="http://www.blabla.cn/images/icons/go.gif">
</a>
</p>
  </body>
</html>



4.在新窗口打开一个链接

<html>
<body>
<p>
<a href="http://www.baidu.com" target=_blank > website link</a>
</p>
  </body>
</html>



5.在html文件里跳转

<html>
<body>
<p>
<a href="#c28"> see chapter 28</a>
</p>
<p>
<a name="c1"></a>
<p> chapter 1</p>
<a name="c2"></a>
<p> chapter 2</p>
<a name="c3"></a>
<p> chapter 3</p>
<a name="c4"></a>
<p> chapter 4</p>
<a name="c5"></a>
<p> chapter 5</p>
<a name="c6"></a>
<p> chapter 6</p>
<a name="c7"></a>
<p> chapter 7</p>
<a name="c8"></a>
<p> chapter 8</p>
<a name="c9"></a>
<p> chapter 9</p>
<a name="c10"></a>
<p> chapter 10</p>
<a name="c11"></a>
<p> chapter 11</p>
<a name="c12"></a>
<p> chapter 12</p>
<a name="c13"></a>
<p> chapter 13</p>
<a name="c14"></a>
<p> chapter 14</p>
<a name="c15"></a>
<p> chapter 15</p>
<a name="c6"></a>
<p> chapter 16</p>
<a name="c17"></a>
<p> chapter 17</p>
<a name="c18"></a>
<p> chapter 18</p>
<a name="c19"></a>
<p> chapter 19</p>
<a name="c20"></a>
<p> chapter 20</p>
<a name="c21"></a>
<p> chapter 21</p>
<a name="c22"></a>
<p> chapter 22</p>
<a name="c23"></a>
<p> chapter 23</p>
<a name="c24"></a>
<p> chapter 24</p>
<a name="c25"></a>
<p> chapter 25</p>
<a name="c26"></a>
<p> chapter 26</p>
<a name="c27"></a>
<p> chapter 27</p>
<a name="c28"></a>
<p> chapter 28</p>
  </body>
</html>


点击“see chapter 28”,会跳转到chapter 28:




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值