Alternatively called a partial path or non-absolute path, a relative path is a URL that only contains a portion of the full path. Its complete location is based on its relation to the directory where it is linking. These shorter addresses are convenient for those who create web pages because they require less typing and take up fewer characters.

How does it work?

We’ll use Computer Hope as an example. On our site, we could link “https://www.computerhope.com/jargon/c/cpu.htm" to “https://www.computerhope.com/jargon/m/monitor.htm" only using “../c/cpu.htm” as both the “c” and “m” directories are in the same directory. The “../” portion of the relative path means “go back one directory.”

Absolute path, Path, Web design terms

  • What is the difference between a relative and absolute path?