One, hyperlink basic usage
Hyperlinks consists of two parts
- First, the link address, link targets can be a URL or file path, which corresponds to the href attribute <a> tag
- 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="目标窗口位置">
</a>
Hyperlink properties
- href: link address represents the path, when the attribute value of "#" represents air link
- target: Specifies the link in which window open, common values have _self (the window itself), _ blank (new window)
Second, the hyperlink applications
- Links between pages: A page to page B, the most commonly used for site navigation
- Anchor link: A page A to page B position A or position B to position A p A p B position
- 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