HTML hyperlink tag A tag function is very powerful, let us introduce the syntax of a tag, common properties and application development, you can see if you do not know the hidden features of a tag.
HTML a syntax
<a href= "url, link Address" target= "destination" title= "description" > Linked content </a>
At the same time anchor text _ Anchor link is also called hyperlink.
URL, url must add http://+ domain name
Relative paths, such as htef= "/abc/", represent the anchor text on this site
Target values are as follows:
_blank--Opens the link in a new window _parent--Opens the link in the parent form _self--Opens the link in the current form, this is the default value _top--Opens the link in the current form and replaces the current entire form (frames page)
If Target does not have a value, the link is opened in the parent form on this page
Common properties in a tag:
HREF: Open destination address (URL), general fill will go to the destination address. such as href= "http://www.PHP.cn/" such as the browser in the Web page mouse click corresponding to this anchor text will open to the page http://www.PHP.cn/
Target: Open destination mode
If there is no such element in the a tag, the default is to reload the corresponding linked page in the Browse Web page
_blank: New Tab window page, set this property, click on the anchor text corresponding to the new Label page window to open the corresponding address
_parent: The parent Opens the Web page, this property can be understood as the page from the page from the newly loaded anchor text, for the HTML framework IFRAME page, the entire page will be re-loaded to open the destination URL address
Commonly used in this two ways to open the target, a new window, one does not set the target to reload the anchor text address point to the URL, one is the entire page parent reload (similar to not set target) the same effect.
HTML a effect
Use a anchor link can go from page A to page B, which is often seen and used, such as news sites, we see the title feel interested, click on the mouse and then go to another page to learn more. This is the use of HTML a hyperlink.
HTML A application example
<a href= "http://www.PHP.cn/" target= "_blank" title= "go to PHP Home" >php</a>
HTML a scope of application
Use HTML A to anchor a text hyperlink to a picture
Exp:
<a href= "http://www. php.cn/"target=" _blank "title=" go to the PHP home "></a>
You can anchor text hyperlinks to text content
<a href= "http://www.PHP.cn/" >php</a>
HTML a app Extension
Same page anchor text-go up and down in the same page to the specified position
Often see the bottom of our page click on the "Back to top" link will go to the top of the page implementation.
Exp:
1, first we add a <span id= "top" name= "top" in the body of the homepage ></span>
2, we go inside the body, need to appear click to go to the top position to add, <a href= "#top" > Back to the top </a>
This allows you to click "Back to Top" to quickly browse to the top of the page on this page.
HTML in the use of hyperlink tags so much, the need for friends can be saved, but also please continue to follow the site's other updates.
Related reading:
Pure CSS Animation effect button
CSS how to set table border style
How to add bold text to CSS