Skip to content

Links, absolute and relative paths in HTML

May 24, 2020
Learn about ⭐ LINKS, ABSOLUTE and RELATIVE paths of HTML ✅: definition, structure and EXAMPLES ⭐ practical and easy. ENTERS!

In this post we will teach you everything you need to know about links, absolute and relative HTML paths: definition, structure and practical examples. ENTERS!


Welcome to another post.

Thanks to the links is that you can go from web page to web page investigating and indicating about any subject, and they exist practically from the beginnings of Internet.

Commonly also they are called hyperlinks, both have the same meaning and denote the same function. The structure of a link is the next:

  • Text: it is also known as «anchor text» and is the text which will contain the link or hyperlink to another web page destination.
  • Hyperlink: is destiny which is placed in the anchor text. Here you must specify the web page destination.

Next, we will show you how you can put into practice the insertion of links (with their respective relative and absolute paths) in HTML.

Links in HTML

The Default HTML links look blue, that if you hover the mouse over it, it will turn into a hand pointing to the anchor text. The length of the anchor text is delimited by the number of words that the link covers.

If you want to create a link, you must follow the following structure:

This is a link that leads to The Master Coria Blog

The HTML tag " " is the default governing link building, and it's the standard that Google officially uses when it comes to SEO issues for your website.

Attribute "Href" is the one that designates the link recipient where the user will be taken, and the anchor text is basically the text that is between the tags, that is, the value of the " " tag .

Mention that, in order to close this tag, you must use its counter tag which is "", otherwise, the anchor text will take the length of all the characters written after the link is opened.

Absolute paths

They are all those links that point to a web address or URL, is also known daily as "link". This link is the most common on the internet, and the one that we recommend ALWAYS use, since among good SEO practices, it is recommended to use it.

These absolute path links in HTML can be both external (links from your own website), or external links (links to other websites).

Example of absolute path binding in HTML.
Example of absolute path binding in HTML.

Examples of absolute paths in HTML

Below we will give you some clear examples which will explain to 100% the use of the absolute paths within your HTML document. Pay attention to each type of example as it describes different types of absolute paths well.

Absolute path to the main page of El Blog de Master Coria.
Absolute path to main site, including a request to a certain section.
Absolute path to YouTube, including a request for a certain video.

As you can see, all the links come within the "href" attribute of the HTML " " tag , and can be of different types of web addresses. You just have to put that link directly between the quotes of that attribute.

Be very careful which sites you link to, since Google takes this into account in the SEO of your website. Polish your Backlinking strategy before making movements.

Relative paths

They are local HTML links that search for some content within the computer or server. We recommend using relative paths as little as possible in your HTML document as they could cause future confusion due to their structure.

We recommend you:  Sorted and unordered lists in HTML

This structure works in the same way as an absolute path, but relative paths have a different way of working or employing in the HTML document.

First, let's look at a concrete example of a relative HTML path so that we can understand what this question is about:

Relative path (internal or local address of the PC or server) to a specific image.

Generally, relative paths are used under programming languages that run behind the server, because exposing this type of internal addresses of a server can carry risks. However, there are other types of relative paths within HTML that can be used:

Example of relative path links in HTML.
Example of relative path links in HTML.

Examples of relative paths in HTML

Relative path that leads to the section / contact of the site in question.

These relative path HTML links direct to the contact section of the website where this hyperlink is placed. If the site is Facebook, then it would go to "".

Another example is the use of these routes to go to certain other sections, using point navigation:

Go to the main page.

Point navigation indicates that it will go back a directory, and look for the index HTML file for that site. If, for example, the user is found in "sections / example.html", the navigation indicates that he should go to "/index.html", leaving the "sections" directory.

It can be worked in more directory levels, as explained below:

Exit 3 directories, go to the HTML index file.

We hope that in this informative article you have learned quite a bit about links (both relative as absolute paths) in HTML. These links may be of interest to you:

Did you understand the issues addressed? Comment your doubts in the comments!

See you in another post.