Relative-paths are URI or directory links to resources that refer to a location relative to the current path.
A relative path references a resource in relation to a current path or directory; its opposite is an absolute path. Web pages frequently make use of relative paths to refer to resources like images and scripts. The advantage of using a relative path is that it remains valid when the host name or root path changes.
As an example, consider a website located at the URL:
http://www.hostname.com/site/page.html
If the page wants to reference an image located at:
http://www.hostname.com/site/images/image.jpg
It could simply make reference to the relative path images/image.jpg
.