Thursday, December 19, 2013

LINKS >>LINK Handling Code -(PART_15)

Topic: I want to create links that will open the pages in new window?
           How can I link to website (say hioxindia.com)?
Explanation:

Opening Link in New Page:

Many a times we want to open the links in new window.
It's simple.
Use the attribute "
target=_blank" inside the tag "<a>".

Example Code:
<a href="test1.html" target="_blank"> Click to test1.html </a>

Result:
Click to test1.html 

Click on the link to test. It will open the page in new window.


Linking to a external website:

The tag is same as other, only thing is that we have to use "http://".
So to link to withfriendship.com we have to use "http://www.withfriendship.com".

Example Code:
<a href="http://www.withfriendship.com"> With FriendShip </a>
Result:

With Friendship 

This will take you to the website.