/    Sign up×
Community /Pin to ProfileBookmark

absolute image vs just image link

Hi Everybody,
I am new to HTML. Can anybody tell me what is the difference between

1) <td><img src=”http://www.marketingeye.com.au/cg/newsletter/stop_press/images/CG_stop-press_bank-ad_08.jpg” width=”7″ height=”314″ alt=””></td>

and just

2) <td><img src=”images/CG_stop-press_bank-ad_08.jpg” width=”7″ height=”314″ alt=””></td>

Why image is sometime not diplayed in part 2.

what if we put

3)<td><img src=”../images/CG_stop-press_bank-ad_08.jpg” width=”7″ height=”314″ alt=””></td>

What does this third part explain?

Waiting for your kind response,

a beginner.

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@CentauriMay 30.2008 — The first example is absolute reference which would work from any folder location from any domain, but the server does have a little more work to do resolving the domain to locate the file. The second is a relative reference, and works when the folder that the html file is in also [B]contains[/B] the "images" folder. The third example works if both the folder the html is in [B]and[/B] the "images" folder are subfolders of another - the ../ means "step back one folder in the tree".

Another relative reference is <img src="/images/CG_stop-press_bank-ad_08.jpg" width="7" height="314" alt=""> where the preceding slash means "relative to the site root" - this will only work from a server and not on your local machine unless you have a web server set up on it.
×

Success!

Help @umair862 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...