How to Open a Link in a New Window

By default, HTML links will open the URL in the same window (active window). However, with TARGET attribute of HTML Link Tag, you can have the new document open in a new window, or if you are using frames, it will open in targeted frame.

When you click the above link , browser will open a new window and show w3c home page.

Link Target Attributes and Values


Open Hyperlink in a New Window

However you can use the TARGET attribute with Html frames . You can target a frame by a name that you have assigned it.

In the above code, sample.html will open in MyFrame area.

More about HTML Frames and Target..HTML Frames