Login | Register | FAQ
Anonymous

image in html

+ Post a reply

Page 1 of 1


image in html

by shuva nandy » Sun Sep 16, 2012 1:12 pm

hi,
i ahve got a a problem in html.when i put an image in html using <img src="c:\newfolder\g.jpg"/> the image is only showing in internet explorer but it is not visible in firefox.can anyone explain me why it is happening?
User avatar

shuva nandy

  • Posts: 1
  • Joined: Sun Sep 16, 2012 1:04 pm

Re: image in html

by XainPro » Mon Sep 17, 2012 9:59 am

shuva nandy wrote:hi,
i ahve got a a problem in html.when i put an image in html using <img src="c:\newfolder\g.jpg"/> the image is only showing in internet explorer but it is not visible in firefox.can anyone explain me why it is happening?

Well there are two paths used in any path reference either in href or in Img src.
Those are
[list=]
Absolute Path
Relative Path
[/list]
Relative Path option is better.
but you should know both options
Absolute Path is a full qualified path of the file/image you are linking with.
for Web absolute paths include protocol and complete file path
i.e
http://www.domainname.com/directory_name/file_name.jpg
When you are working locally and want to use absolute path then instead of http:// you use file (local) protocol.
i.e
<img src="file:///C|/newfolder/g.jpg" />
or
<img src="c:\newfolder\g.jpg"/>
because its only for local use some browsers understands it and some don't.
and there are chances of broken link when you upload it.

Relative paths change depending upon the page the links are on. There are several rules to creating a link using the relative path:

links in the same directory as the current page have no path information listed

filename

sub-directories are listed without any preceding slashes

weekly/filename

links up one directory are listed as

../filename
User avatar

XainPro

  • Posts: 3311
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1