The vast majority of pages on the Internet contain links to other pages, to files for download, to pictures, etc. Some of the hyperlinks open in the same window, the rest - in a new one. Let's see how to open links in a separate window.
Instructions
Step 1
In HTML (HyperText Markup Language), which is used to describe web pages, the instruction to print a link looks like this: Link textThis is the simplest option. Such instructions in HTML are called "tags" and, as a rule, each tag contains additional information - "attributes". In this simplest version of the link, there is only one attribute - "href". It contains the URL of the page (or file) that should be shown if the visitor follows this link. And the attribute that indicates in which window this new document should be shown is designated as "target". If you can write any address in the href attribute (if it is correct, of course), then only four different values can be specified in target: _self - the page must be loaded into the same link, was loaded into this very parent window; _top - the page must be loaded into the same window. Moreover, if this window is divided into frames, then all of them should be destroyed and the new page should be the only frame in this window; _blank - the document indicated by the link should be opened in a new window.
Step 2
Thus, to make the link open in a separate window, the tag should look like this: Link text
Step 3
There is another kind of windows - "modal windows". These are windows that, if they have already appeared, they will block all other browser windows until they do their job. And their job is to get the visitor to do something - for example, enter a username and password, or press any confirmation button, or fill out a questionnaire, etc. There are also more peaceful uses for modal (or "dialog") windows. Of course, opening links in separate modal windows is a more complicated task and requires the use of CSS (Cascading Style Sheets) with JavaScript in addition to HTML. A relatively simple sample implementation can be seen here -