创建超级链接
<!-- 基本格式:<a href="放xxx的链接">xxx</a> -->
<html>
<body>
<p>
<a href="/index.html">本文本</a> 是一个指向本网站中的一个页面的链接。
</p>
<p>
<a href="http://www.microsoft.com/">本文本</a> 是一个指向万维网上的页面的链接。</p>
</body>
</html>
将图像作为链接
<html>
<body>
<p>
您也可以使用图像来作链接:
<br/>
<a href="/example/html/lastpage.html">
<img border="0" width="104" height="142" src="/i/eg_buttonnext.gif" />
</a>
<!--链接里面是点开图片之后的链接,boder是图片的边框大小,src是图片的URL(图片的地址)-->
</p>
</body>
</html>
在新的窗口打开链接
<html>
<body>
<a href="http://www.w3school.com.cn/" target="_blank">
Visit W3School!
</a>
<!--在新窗口中打开 target="_blank"-->
<p>
如果把链接的 target 属性设置为 "_blank",该链接会在新窗口中打开。
</p>
</body>
</html>
跳出框架
<html>
<body>
<p>
被锁在框架中了吗?
</p>
<a href="/index.html" target="_top">
请点击这里!
</a>
<!--跳出框架 target="_top"-->
</body>
</html>
链接到同一个页面的不同位置
<!--
<h2><a name="C4">Chapter 4</a></h2> 命名一个连接
<a href="#C4">查看 Chapter 4。</a> 跳转到该位置
-->
<html>
<body>
<p>
<a href="#C4">查看 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>
</body>
</html>