Free technical help for digital creators - music, video, art, photography, graphic & web design

Absolute & relative links by Matt Ottewill

First the clever metaphor ...

I live at 64 Death Star Close, Wookieberg, Sweden, Europe, Earth, The Solar System, The Universe.

My fried Joe lives next door at number 63.

The first statement is an absolute location (or link) and the second is relative.

Absolute links

An absolute link gives the precise location of a file on a computer system. A URL is a good example of an absolute link, such as ...

  • http://www.planetoftunes.com/website-design/absolute-relative.html

In this example the protocol (http), domain (www.planetoftunes.com), folder directory (web_site) and file name (index.html) is specified.

You use absolute links when linking from your web site to another.

Relative links

A relative link gives the location of a file relative to the current document. Relative links are used for linking between html pages when a web designer is building a web site.

Such as ...

../web_site/absolute_relative.html

When this link is clicked on the web browser will look outside of the current directory (folder), look for a folder called web_site and then find the html doc entitled absolute_relative.html.