Hypertext links are provided in order to link a text, image or other elements of pages and other hypertext documents. All the elements of the page, including links, are created by the browser that receives detailed instructions sent to it by the server code page. This is the code in HTML (HyperText Markup Language "hypertext markup language") consists of "tags" that describe the type, appearance and location of all elements of the web page. The standard url is created by the browser when it encounters in the page code, for example, this tag:<a href="URL">Text link</a>Here <a href="URL"> - the opening tag of the link </a> closing. The start tag may contain additional information "attributes". In this simple reference, the href attribute contains the address of a page or other document request to be sent if the visitor clicks on the link. Sometimes you don't have to specify the full address: if the requested document is on the server in the same folder (or a subfolder of it), it is enough to specify only the filename or the path to subfolder. Such addresses are called relative, write them should, for example, like this:<a href="moreText.html">Text link</a>When you click on this link will download the document moreText.html from the same folder. And ' absolute links start with a Protocol, for example:<a href="">Text link</a>Here "http" (HyperText Transfer Protocol "hypertext transfer Protocol") is an ordinary document address on the network. And if you specify the Protocol "mailto", the hyperlink will launch your email program, instead go to another page:<a href="">email-link</a>In the links to the files lying on the FTP server indicate, respectively, the Protocol File Transfer Protocol (FTP — "file transfer Protocol"):<a href="">Link to archive</a>
Another attribute of a hyperlink, which indicates that the window should load this new document, referred to as "target". If the href attribute you can enter any valid address, the target can take only four values:_self - page should load in the same window or frame. "Frames" is called one part is divided into several parts of a window;_parent - if the current page itself was loaded from another window (or frame), then it has the "parent" window. And a value of _parent requires the page to which the link refers has been loaded into this parent window;_top – new page should load in the same window. If this window is divided into frames, at boot they will be destroyed, and a new page will be the only frame in this window, _blank for the link, a separate window opens;for Example:
<a href="moreText.html" target="_blank">Link will open in a new window</a>
It is possible to make a hyperlink for transition not to another page, and on any given area of the same document. To specify in the html code of the document is a "destination" use link anchor:<a name="Якорь1"></a>a link that scrolls the document to the anchor looks like<a href="#Якорь1">Link to first anchor page</a>you Can refer to the anchors not only this document, but in the other:<a href="Якорь5">an Anchor in another page</a>of Course in the html code of another document should be such a link-an anchor with the attribute name="Якорь1".
A hyperlink can be not only text but also other page elements - for example, pictures. The simplest tag that draws a picture, looks like this:<img src="picture.gif" />And that the picture was a hyperlink, it must be enclosed between opening and closing tags of the link:<a href="moreText.html"><img src="picture.gif" /></a>