Quackit Logo

Got a MySpace Page?

Get "www.yourname.com" for your MySpace page. Learn how >>.

HTML Open Link in New Window

Print Version

You can use the HTML code on this page to force a link to open in a new window.

Example HTML Popup Window Code:

<a href="http://www.great-workout.com/best-leg-exercises.cfm" target="_blank">Best Leg Exercises</a>

This results in:

As the above example demonstrates, to open a link in a new window, you simply add target="_blank" to the anchor tag. Everything else stays as a normal link.

You can also use JavaScript to open a new window. Using JavaScript, you can also specify what the window should look like. For more info, see JavaScript Popup Windows.

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!