Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML
Website builder

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.

More Link Codes

You can do much more with HTML links. Here are more HTML link codes - each one catering for a specific purpose.

Enjoy this page?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!