• Register
57,980 points
11 5 5

Want to solve programming problems and get paid for it? If that sounds interesting to you then contact us.

One of the principles on which the WWW is based is document linking. So we are going to learn how to link two web pages. This is based on the concept of Hypertext, which means something like presenting documents that can be forked or executed when requested. This definition dates back to 1963 by the sociologist Theodore Holm Nelson, long before the WWW was born.

One of the forms of hypertext is hyperlinks or hyperlinks or links (vulgar form best known of the three).

So if we want to make web pages using HTML, the first thing we have to learn, or one of the first things, is how to make links.

For this, we have to rely on the A element that comes from the English «anchor» (anchor) and which is one of the base elements of the HTML language.

The attributes of element A that we have to know to generate the links are the following:

href: Where the destination page (or resource) must be specified. This may be with the absolute or relative address of the link that we want to put.
Target: Where we will indicate the destination frame of the page. If we want the link to open on the same page, we leave it empty.
title: link title will be useful for clients to interpret what the displayed link means. It is usually useful in SEO issues.

We assume that we are on pageA.htm and we want to link and therefore open pageB.htm. In HTML code it will be something like this

< A href = "paginaB.htm" title = "My link" > My link </ a >

In this simple way, we can manage to link two web pages using HTML and thus continue to weave this immense network that is the WWW.

57,980 points
11 5 5