<wbr style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"><span style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"></span><wbr style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"><span style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)">别小看这两个短小的标签,它们在HTML中的</span><span style="color:#FF0000; word-wrap:normal; word-break:normal; line-height:21px; font-family:simsun; font-size:14px; text-align:left; background-color:rgb(231,238,244)">超链接指向</span><span style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)">,起到</span><span style="color:#FF0000; word-wrap:normal; word-break:normal; line-height:21px; font-family:simsun; font-size:14px; text-align:left; background-color:rgb(231,238,244)">非常重要</span><span style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)">的作用:</span> <div style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"> 1)<span style="color:#FF0000; word-wrap:normal; word-break:normal"><a></span>涵义为在HTML中定义某一个链接指向,如(请复制到DW尝试):</div> <div style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"> <div> <textarea readonly name="code" class="html"><html> <body> <p><a href="/index.html">此文本</a> 指向本站中的一个页面的链接。</p> <p><a href="http://blog.sina.com.cn/yefeng9393">此文本</a> 指向夜风新浪博客页面的链接。</p> </body> </html></textarea><br><span style="color:rgb(255,0,0); word-wrap:normal; word-break:normal">此外</span>,在<a>标签的属性中,有一个很重要的属性,就是<span style="color:rgb(237,28,36); word-wrap:normal; word-break:normal">target属性</span>,<span style="word-wrap:normal; word-break:normal">如(请复制到DW尝试)</span>:</div> </div> <div style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"> <div> <textarea readonly name="code" class="html"><html> <body> <a href="http://blog.sina.com.cn/yefeng9393" target="_blank">Visit 夜风新浪博客!</a> <p>若把链接target属性设置为"_blank",则此链接在新窗口中打开!</p> </body> </html></textarea><br> 如果我们想把一个<span style="color:rgb(237,28,36); word-wrap:normal; word-break:normal">图片作为超链接</span>,可以用以下代码进行定义<span style="word-wrap:normal; word-break:normal">(请复制到DW尝试)</span>(注意img的写法):</div> </div> <div style="color:rgb(73,73,73); font-family:simsun; font-size:14px; line-height:21px; text-align:left; background-color:rgb(231,238,244)"> <div> <textarea readonly name="code" class="html"><html> <body> <p> <a href="http://blog.sina.com.cn/yefeng9393" title="夜风新浪博客"> <img src="http://portrait8.sinaimg.cn/2420127911/blog/180" /> </a> </p> </body> </html></textarea><br> ——在上面最后一个例子中,用到了<span style="color:rgb(237,28,36); word-wrap:normal; word-break:normal">title属性</span>,来定义鼠标经过图片时显示的文字!这非常有用!</div> </div> <br></wbr></wbr>
HTML标签天天练4--<a>
最新推荐文章于 2025-05-13 20:07:04 发布
本文深入解析HTML中的超链接标签及其使用方法,包括如何创建文本链接、图片链接、设置链接目标和利用title属性。通过具体实例演示,帮助理解超链接在网页中的重要作用。
161

被折叠的 条评论
为什么被折叠?



