HTML 超级链接实例

创建超链接
<html>

<body>

<p>
<a href="/index.html">
This text</a> is a link to a page on 
this Web site.
</p>

<p>
<a href="http://www.microsoft.com/">
This text</a> is a link to a page on 
the World Wide Web.
</p>

</body>
</html>

图像超链接
<html>

<body>
<p>
You can also use an image as a link:
<a href="/example/html/lastpage.html">
<img border="0" src="/i/eg_buttonnext.gif" width="65" height="38">
</a>
</p>

</body>
</html>


在新的浏览器窗口打开链接
<html>

<body>

<a href="/example/html/lastpage.html" target="_blank">Last Page</a> 

<p>
If you set the target attribute of a link to "_blank",
the link will open in a new window.
</p>

</body>
</html>


链接到同一个页面的不同位置
<html>

<body>

<p>
<a href="#C4">See also Chapter 4.</a>
</p>

<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>

<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 10</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 12</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 13</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 14</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 15</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 16</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 17</h2>
<p>This chapter explains ba bla bla</p>

</body>
</html>


跳出框架
<html>

<body>

<p>Locked in a frame?</p> 

<a href="http://www.w3school.com.cn/"
target="_top">Click here!</a> 

</body>
</html>


创建电子邮件链接
<html>

<body>

<p>
This is a mail link:
<a href="mailto:[email protected]?subject=Hello%20again">
Send Mail</a>
</p>

<p>
<b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly.
</p>

</body>
</html>


创建电子邮件链接 2
<html>

<body>

<p>
This is another mailto link:
<a href="mailto:[email protected][email protected]&[email protected]&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!">Send mail!</a>
</p>

<p>
<b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly.
</p>

</body>
</html>

你可能感兴趣的:(html,Web,框架,浏览器)