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

CodeResult

HTML Help

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?