Hyperlinks basic usage and applications

One, hyperlink basic usage

  Hyperlinks consists of two parts

  1.   First, the link address, link targets can be a URL or file path, which corresponds to the href attribute <a> tag
  2.   Second, link text or image, click on the text or image, will jump to the href attribute specifies the link address, the basic syntax of the hyperlink below.
<a href="链接地址" target="目标窗口位置"> link text or image </a>
<a href="链接地址" target="目标窗口位置">
Image alt text
</a>

  

  Hyperlink properties

  1.   href: link address represents the path, when the attribute value of "#" represents air link
  2.   target: Specifies the link in which window open, common values ​​have _self (the window itself), _ blank (new window)

Second, the hyperlink applications

  1.   Links between pages: A page to page B, the most commonly used for site navigation
  2.   Anchor link: A page A to page B position A or position B to position A p A p B position
  3.   Functional links: Calling program functions in other types of pages, such as e-mail, QQ, MSN, etc.
    Use anchor link: 
    <a href="#reg" target="_self"> quick registration </a> 
    <a name="reg"> new user registration </a>  
    Using functional link: 
    <a href="tencent://message/?uin=1649059890&Site=&Menu-=yes"> contact customer service </ a

Guess you like

Origin www.cnblogs.com/huazhiling/p/11504672.html