How to open link in new window or tab?

When I’ve started my first website I was affiliate. That means you promote other websites on your site and get % for that. I was thinking, why not, that’s easy, they give you links and you just paste it on your site. Yes its easy, but….

First problem I’ve ran into was that most of those links they give you open on top of your website and I surely didn’t want people to leave my website so quickly,  so much more links here they can choose from or choose at the same time. I was asking around, and asking and asking but it seemed that no one could tell me what is it there, in those links that makes some of them open in new window and some on top of mine. I don’t like to read much, I mean read instructions and tutorials, that’s why I prefered to ask so-called “webmasters” and “customer service people” (whom suppose to be webmasters also).


Click Here!

First I’ve got frustrated about my ignorance, then about their ignorance or selfishness, and then I was determined to find out by myself. Trial and Error process-lol. I’ve pasted several of those links in one document, few that open in new window or tab and one then don’t. I’ve looked for at their similarities to find out what is different. And bingo, there it was one thing, “attribute” I think they call it, target=”_blank”.

I’ve checked online, by search and find out what TARGET is and what that actually means:

The target attribute specifies where to open the linked document.

And it goes like this:

Value Description
_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in a named frame

For this I want to thank the courtesy of http://www.w3schools.com/  the best website for learing about web development aka webmaster skills.

But then I had to learn where to place that attribute in a link, string, in order to work – lol. That was lil difficult for me and I’m still not sure for many links or when I need to embed some code, thus I still use “trial and error” till I reach success – lol. Even so, even I’m lazy to read and prefer to try to find out myself, here is how it goes:

Let’s say we have this link: Visit Muahaaa.com!

Now, to make it open in a new window or tab you need to add target like this:

<a href=”http://www.muahaa.com” target=”_blank”>Visit Muahaaa.com!</a>

The result of this will be that you will see on your website “Visit Muahaaa.com” and when you click on it, new window or tab will open with Muahaaa.com website.

Hooray! One newbie problem solved! Hope its helpful for you as it was for me – life saving – lol!

Muahaaa and shine like the start that you are!

 

 

Click Here

 

Leave a Reply

Skype contact

Skype

Topics

Spiritual Teachers

Log In