There's also the absolute root relative linking. e.g.
Code:
<img src="/images/foo.jpeg" />
and current document path relative linking. e.g.
Code:
<img src="../images/foo.jpeg" />
<img src="./images/foo.jpeg" />
In the first example, the browser simply prefixes the src location with the proto://domain the current page is on. In the second example, assuming foobar.html is in www.example.com/pages/ and you have a directory for images at www.example.com/images/ that would work. In the third example, assuming foobar.html is in www.example.com/ and you have the same directory for images, that would also work.
This removes a lot of site specific hassle from the web page and leaves it up to the browser to do the right thing(tm).