How to make a link open in a new window in HTML

Here you’ll find out how to make a link open in a new window when clicked on your website.

-The standard link in HTML looks like this:  <a href=””>Click Link to Google</a>

This opens the link in the same window that the current page is on.

This can be a hassle when you need to reference both sites at once.

-You can add code to make the link open in a new window.

-You want to add target=”_blank” at the end of the href= before the > (end tag)

-Here’s an example:  <a href=”” target=”_blank”>Link to Google in a New Window</a>

This will allow the link to open in a new window and the user may reference both windows at once.


~ by tolandennis on January 31, 2011.

2 Responses to “How to make a link open in a new window in HTML”

  1. Yup. This works. I like how the structure of your entry is really straightforward and easy to understand. You pretty much just lay it out simply. The example is a nice touch too.
    Hannah 🙂

  2. Good concise and valuable description of this html code. Might want to add this link:
    so people can try it for themselves.

Comments are closed.

%d bloggers like this: