How to make a separate window

How to make a separate window

The absolute majority of pages on the Internet contains references to other pages, to files for loading, on pictures, etc. A part of hyperlinks opens in the same window, the others - in new. Let's look how a discovery of links in a separate window is made.


1. In the HTML language (HyperText Markup Language — "hypertext markup language") which is used for the description the Internet of pages, the instruction to print the link looks so: <a href= "" URL""> the Text of the link </a> Is the simplest option. Such instructions in HTML are called "tags" and, as a rule, each tag contains also additional information - "attributes". In this simplest version of the link an attribute only one - ""href"". It contains the page address (or the file) which is slenut to show if the visitor follows this link. And the attribute which specifies, in which a window this new document should be shown, is designated as ""target"". If it is possible to write any address to the href attribute (if it correct, of course), then it is possible to specify only four different values in target: _self - the page should be loaded into same the link, was loaded into this most parent window; _top - the page should be loaded into the same window. And if this window is separated into frames, then all of them should be destroyed and the new page should be the only frame in this window; _blank - the document designated by the link should be open in a new window.

2. So that to make discovery of the link in a separate window the tag should look so: <href= "" URL"" target= "" _blank""> Text of the link </a>

3. There is one more kind of windows - "modal windows". These are such windows which if appeared, then will block all other windows of the browser until perform the work. And their work is in achieving from the visitor of some action - for example, input of the login and the password, either clicking of any button of confirmation, or filling of the questionnaire, etc. There are also more peaceful applications modal (or "dialogue") windows. Of course, opening of links in separate modal windows - the task more difficult also requires uses except HTML also the CSS languages (Cascading Style Sheets - "cascading style sheets") with JavaScript. It is possible to look at rather simple model of implementation here -

Author: «MirrorInfo» Dream Team