Free revision guides

Absolute and relative addresses

National 5 Computing Science: Web design and development

Absolute and relative addressing is asked about in most years of the National 5 web section. The examiners' reports for 2024 and 2025 say answers often explain only half the difference.

Absolute address

The full address of a page, including https:// and the website's domain. Use it for an external link: a link to a page on another website.

<a href="https://www.calmac.co.uk">Ferry times</a>

Relative address

The path from the current page to another file in the same website. Use it for internal links, pictures, sound and video.

If index.html is in the main folder, and the walks page is in a folder called routes:

<a href="routes/coast.html">Coastal walks</a>
<img src="images/harbour.jpg" alt="The harbour at Portree">

Write the folder name, a forward slash, then the file name. The path starts from the folder that the current page is in.

A full explanation gains the mark
  • "Absolute is the whole address and relative is part of it." (Only half the difference.)
  • "An absolute address is the full URL of a page on another website. A relative address is the path from the current page to another file in the same website."

Why relative addresses for internal links?

If the whole website moves to a new web host or a new folder, relative links still work, because the files are still in the same place relative to each other. Absolute links to the old address would all break.

Try two exam-style questions

Choose an answer, say how sure you are, then press Check. Every wrong answer tells you why it is wrong.

The Path finder simulation
In the course: Path finder. Find your way round a website's folders and build the right relative path for each link and picture.

The full course covers every topic like this. Every topic in National 5 Computing Science has a short note, a simulation to try and a practice quiz with feedback on every answer, plus coding lessons, a full mock exam and a progress report for parents.

Create an accountTry more for freeAbout the course

More guides

This site is independent: it is not connected to the SQA or Qualifications Scotland. Points from the examiners' course reports are given in our own words.