How to call various paths?

<img src="http://www.mydomain.com/localDirectory/myImage.jpg">

I can call the above path an absolute path.

<img src="../localDirectory/myImage.jpg">

I can call the above path a relative path.

<img src="/localDirectory/myImage.jpg">

How can I call the above path?

Calling it “a local absolute path” possible?

Do you have any good names for discriminating the 3 paths above?
Do you have another path for adding to the 3 paths above?

Try to forget about paths as far as img src is concerned because a URL is required.

If only a path is entered the the browser adds the current URL.

Beware that if the web page is a couple of levels deep then there is a good chance the URL is incorrect.

Far better to have an /assets/imgs directory and just prefix the path with a leading slash.

It’s a relative path - it’s relative to the root directory. The second is relative to the current directory.

1 Like

Absolute vs Relative: If the sentence you use begins with “start at”, it’s relative.
(“Start at the root directory”,“start at the current directory”)
If it begins with “Go to”, it’s absolute.
(“Go to example.com forward slash…”)

1 Like