Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML

Print Version

HTML Open Link in New Window

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

Example

<a href="http://www.quackit.com/html/html_help.cfm" target="_blank">HTML Help</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.

Creating a "Popup Window"

You can also use JavaScript to open a new window. Using JavaScript, you can also specify what the window should look like. This is a common technique for creating a "popup window". For more info, see Popup Windows.

Enjoy this website?

  • Share
  • Add this page to your Favorites
  • Link to this page (copy/paste into your own website or blog):
  • Link to Quackit using one of these banner ads.
  • Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

© Copyright 2000 - 2010 Quackit.com