Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between src="/images/logo.gif" and src="images/logo.gif"?

Tags:

html

<img src="images/logo.gif" />

is equivalent to

<img src="./images/logo.gif" />

But

<img src="/images/logo.gif" />

is different.

Where is the third item looking for logo.gif?

like image 882
bobobobo Avatar asked Jul 16 '09 23:07

bobobobo


1 Answers

The third one is looking relative to the root of the site, so if you were on a page at:

http://entrian.com/somewhere/page.html

it would look in:

http://entrian.com/images/logo.gif

ignoring the somewhere piece of the page's address.

like image 187
RichieHindle Avatar answered Sep 28 '22 04:09

RichieHindle