HTML Links

HTML Links

Web document requires an opportunity to create multiple connections between pages and sites. In short, link is address to a certain document or webpage. Such connections are created using specific tags. Texts, forms or images can be used for creating links between webpages.
It is necessary to define certain terms before explaining how linking is represented in HTML code. Hyperlink points to a certain resource located on the web, be it an image, a document, a movie etc.. Anchor is a term used to define content within the webpage, tied to a hyperlink. <a> is an HTML element, which defines anchors and hyperlinks in the HTML code.
HTML link must be defined in accordance to the rules of HTML syntax. It should be formulated the following way:
Example
1
<a href="url">Link text</a>
Example description: start tag <a href="url"> contains link attribute. Link text (i.e. an element content) is the text to be displayed on the page.
Element content should necessarily contain the text. It may contain image or any other HTML element.
Href is an attribute, which defines the link destination.
Example:
1
<a href="http://www.conkurent.com/">Visit Conkurent</a>
Target is an attribute, which defines how the link will open.
Example:
Name is an attribute, which associates <a> element with a specific name anchor containing in the HTML document. Named anchor will not be displayed in some specific manner.
Example:
Named anchors are used for multiple purposes. For instance, they can be used for creating contents at the beginning of the document. An anchored name will be given to each document section, and links to the names will be included into the contents.
*Important note: it is recommended to use slash to divide references into subfolder. Formulating link without a trailing slash will produce two requests to a web server, because browser will add slash and create a new request.