Home / the Internet / Web programming / How to make a hyperlink on the site

How to make a hyperlink on the site

/
91 Views

Hyperlinks in site pages</a>

Hyperlinks are the basis on which the structure of the Internet is built. It is these elements of Internet pages that allow you to link pages of websites to a single network.

Let's consider in detail how hyperlinks are inserted into documents.

Instructions

    1

Hypertext links are designed to help you,To link text, images, or other page elements with other hypertext documents. All elements of the site page, including links, are created by the browser, which receives detailed instructions from the page code it sends to the server. This HTML code (HyperText Markup Language -? Hypertext markup language?) Consists of? Tags ?, which describe the type, appearance and layout of all elements of the web page. A standard hyperlink is created by the browser when it encounters in the page code, for example, such a tag: & lt-a href = "URL" & gt-Text link & lt- / a & gt-Here & lt-a href = "URL" & gt- - opening link tag, & lt - / a & gt- - closing. The opening tag can contain additional information -? Attributes ?. In this simple link, the href attribute contains the address of the page or other document that will be sent to, if the visitor clicks the link. Sometimes it is not necessary to specify the full address - if the requested document is on the server in the same folder (or nested in it), then just specify its name or the path to the subfolder. Such addresses are called? Relative ?, they should be written, for example, as follows: & lt-a href = »moreText.html» & gt-Text link & lt- / a & gt-When clicking this link, the moreText.html document will be downloaded from the same folder. And the absolute addresses of the links begin with the indication of the protocol, for example: & lt-a href = "http://site.ru/moreText.html" & gt-Text link & lt- / a & gt- Here "http" (HyperText Transfer Protocol -? Hypertext Transfer Protocol ?) Is the usual address of the document on the network. And if you specify the "mailto" protocol, the hyperlink will start your mail program, instead of going to another page: & lt-a href = "mailto: mailto: moiAdr@site.ru" & gt-email-link & lt- / a & gt-In links to Files lying on the FTP server indicate, respectively, the FTP (File Transfer Protocol ?, File Transfer Protocol?): & Lt-a href = "ftp://site.ru/file.rar" & gt-Link to the archive & lt- / A & gt-

    2

Another hyperlink attribute that specifies inWhich window should download this new document, is written as "target". If you can enter any valid address in the href attribute, target can have only four values: _self - the page should be loaded into the same window or frame. ? Frames? Call one part of the divided into several parts of the window-_parent - if the current page itself was loaded from another window (or frame), then it has a? Parental? window. Does the _parent value require that the page referenced by the link be loaded into this parent window-_top? You need to load a new page into the same window. If this window is divided into frames, then at startup they will be destroyed, and the new page will be the only frame in this window-_blank? To go to the link a separate window will be opened-For example:
& Lt-a href = "moreText.html" target = "_ blank" & gt-Link will open in a new window & lt- / a & gt-

    3

There is an opportunity to do Hyperlink To go to another page, but to some otherSpecified area of ​​the same document. To specify in the html-code of the document such a destination? Use the anchor link: & lt-a name = "Anchor1" & gt- & lt- / a & gt-A the link that scrolls the document before this anchor looks like this: & lt-a href = "# Anchor1" & gt-Link to the first page anchor & lt- / a & gt -You can refer to anchors not only in this document, but also in others: & lt-a href = "http://site.ru/moreText.html#Yakor5" & gt-Anchor in another page & lt- / a & gt-Of course in the html- Code of another document, there must exist such an anchor reference with the attribute name = "Anchor1".

    4

A hyperlink can serve not only text, but alsoOther page elements - for example, pictures. The simplest tag that draws the picture looks like this: & lt-img src = "picture.gif" / & gt-And for the picture to become a hyperlink, it should be enclosed between the opening and closing link tags: & lt-a href = "moreText.html" & gt - & lt-img src = "picture.gif" / & gt- & lt- / a & gt-

How to make a hyperlink on the site Was last modified: June 20th, 2017 By Seivaamm
It is main inner container footer text