Build Your Own Business Website header image

When is it Appropriate to Use the Target Property to Open a Link in a New Page?

Difficulty Level -

Filed Under Topics - ,

Listed Under Lesson Subjects -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

This member asks when it is appropriate to use the target property in a link to make the link open in a new page. We discuss the current opinions on the subject and then I describe what I do and why.

Video Transcript

So your next question was “Should I open post in a new page and when do we use the new page open link?” What do you mean by that?

Yeah, I wasn’t clear on that. A couple of my friends who also have a site say that when there’s a link in my site that goes out to another site… sometimes when I’m on somebody’s site, it’ll take me off the site and sometimes it will keep me on the site. Is there a protocol or etiquette to that that I should be doing? Does this matter?

Well, I do understand what you’re saying. A HTML link element, an a element can have a target property and the target property is the property that says whether or not the link opens up in a current window or opens up in a new window. Now it is generally… these days are considered to be good practice to let your user decide whether or not they want to open it up in a new window or not. And so if you don’t specify a target in the link then it automatically just leaves that site to go to another site. Now I understand that that’s generally considered to be good practice. That’s not my practice. If I have a link off to another site then I always give it a target. Even though you can sit here for example, looking at this link here right? You can sit here, hover over it, right click and say, “Open Link in New Tab.” That’s the tool that you use if you want to stay on the page. But my personal feeling about this is that’s not… I don’t do that. And also generally in lessons, if a lesson shows a list of videos, if you click on that video link, it will usually open up on another page and leave the lesson page there so you can go back and forth without having to use the back button or something like that. That’s my personal practice but I believe that if you will, the politically correct practice is to let the user be in control of what happens there and let them decide whether or not they want it to open up in a new page or not.

Right. Well, sometimes I’ll click on the link and it’ll just sit… it’ll take me you know, maybe you’ve got 10 windows open and it’ll take me out of their site and then I’m trying to find where I was. And so, that makes me even more upset and I feel like why couldn’t they just let it open in a separate window?

Well, you have to actively do that. The people who say that you shouldn’t do that assume that everybody knows how to right click and say “Open Link in New Tab.” Now in my experience, a fairly small percentage of the people actually know how to do that but that’s what the right click is intended for so you can decide what you want to happen here. You know, I feel compelled to do what I think is best for my site and my users and I’m making a decision, generally speaking, for my users that… well, I usually consider that when I’m looking at a link and say to myself, “Okay, are they going to want this page to stay open or are they happy just moving on to the next page?” And that’s just a value judgment that I make myself.


0 Comments… add one

Save $200 on Membership Now!

Start learning today for as little as
$0.82 PER DAY!
Subscription Options
0 comments… add one