The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other HTML code for launching a link in a new window…

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #39302

    I have finally figured out how to fade images out and in with HTML coding. However, I am needing to know what words to put where in order to have a linked page open in a new window. Currently it opens in the same window, taking the viewer away from my page…

    Here is the code:

    my website is: the facebook/twitter links are at the bottom of the page… Slowly getting there.

    Any help will be received with sincere gratitude.


    opens in a new window/tab.


    So your code would look something like this:


    That would open your facebook in a new page/tab. You can sub the text for an image if you want.


    You can also use jQuery to open any outbound page in a new tab.


    I must be missing something because it still isn’t working:


    I’m also hoping to do the new window on my portfolio as well as links that I am going to redesign…


    Works fine for me.

    I must warn you: generally opening links in a new window is bad UX. It isn’t as common any more, with the only exception being when clicking an external link (and you probably shouldn’t use it for that either, at least not without using an icon to indicate it). If your site is useful, visitors will come back.

    Users don’t like control being taken away from them. They like being able to choose whether or not they want to open a link in a new window, not have that decision made for them. Also, opening a link in a new window doesn’t carry across the original window’s history, which means the back button becomes useless.

    TL;DR think carefully before simply opening all links in a new window, it just might annoy your users more than it helps them.


    @joshuanhibbert I wouldn’t say it’s bad UX because it really depends on the user. In my case, I prefer external links on sites that open in a new tab. It can also reduce clicking back instead of just closing a tab.


    show us your html code so we can see what isn’t working .


    @jurotek That’s only relevant to bad UX if you decide not to view any other page otherwise more clicking would incur to get back to the source instead of exiting the tab. That’s my only argument for it (external links only).


    I appreciate the sentiment that forced external links are a bit pushy, but I think there are situations where external links are pretty logical.. like if you’re in the middle of filling out a form or in some strange modal situation that can’t be instantly reconstructed based on a file path (which maybe shouldn’t exist, but reality being what it is, often will), or many more app-like interfaces.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Other’ is closed to new topics and replies.