Targeting New Windows

Contact Us or call 1-877-932-8228
Targeting New Windows

Targeting New Windows

The target attribute is used to specify the browser window in which the linked page will open.

The target attribute is deprecated in HTML 4.0, but no other method for targeting new windows is provided. To be (X)HTML Strict compliant, you need to open new windows with JavaScript or by using some other scripting technique. Note that the target attribute is no longer deprecated in HTML5. So, it's usable in all past and current versions of HTML except (X)HTML Strict.

<a href="Company.html" target="newwin">Our Company</a>

If there is no open browser window with the specified target name, a new window will be opened with that name. As long as that window stays open, future links with the same target value will target that window. To force each link to target a brand new window, use "_blank" as the value of the target attribute.

<a href="Company.html" target="_blank">Our Company</a>

See Links/Demos/Links.html for more examples of links with targets.