1. 程式人生 > >html鏈接標簽

html鏈接標簽

表示 新頁面 地址 tca itl www. 鼠標懸停 缺省 itcast

<a>標簽可以在網頁上定義一個鏈接地址,它的常用屬性有:

  • href屬性 定義跳轉的地址
  • title屬性 定義鼠標懸停時彈出的提示文字框
  • target屬性 定義鏈接窗口打開的位置
    • target="_self" 缺省值,新頁面替換原來的頁面,在原來位置打開
    • target="_blank" 新頁面會在新開的一個瀏覽器窗口打開
<a href="#"></a> <!--  # 表示鏈接到頁面頂部   -->
<a href="http://www.itcast.cn/" title="跳轉的傳智播客網站">傳智播客</a>
<a href="2.html" target="_blank">測試頁面2</a>

html鏈接標簽