Login | Register | FAQ
Anonymous

inserting image

+ Post a reply

11 posts 1, 2


inserting image

by gate2013 » Sun Jul 29, 2012 3:18 pm

Good evening Sir,
I am from India.I have just tried a html coding to insert an image,but when I open the file in my browser (Firefox) I just get a small blank icon on the left of the page .I have also checked the hidden file setting it is also ok.
My code is
<html>
<body>
<img src="C:\a.jpg">
</body>
</html>
The image pat is also right.Sir I am not getting where is the error?
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by atik » Sun Jul 29, 2012 4:04 pm

gate2013 wrote:Good evening Sir,
I am from India.I have just tried a html coding to insert an image,but when I open the file in my browser (Firefox) I just get a small blank icon on the left of the page .I have also checked the hidden file setting it is also ok.
My code is
<html>
<body>
<img src="C:\a.jpg">
</body>
</html>
The image pat is also right.Sir I am not getting where is the error?

If the image path was correct, then it shouldn't have blank box instead of image. But first i would recommend you to put the image and html in same directory and then just use image name as src (i.e. src="a.jpg"), remember, put image and html in same directory. Then open the html with browser and see if that runs and you can see image. If that succeeds, then move the image to your desired directory and change the image path accordingly.
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: inserting image

by gate2013 » Mon Jul 30, 2012 9:46 am

Thanks Sir..But is it impossible to insert an image when the image is placed somewhere else in any directory of my laptop, but my html code is present in desktop of my laptop?I will give the complete path like :
"C:\Documents and Settings\DELL\Desktop\FACEBOOK\602.jpg"
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by atik » Mon Jul 30, 2012 9:50 am

gate2013 wrote:Thanks Sir..But is it impossible to insert an image when the image is placed somewhere else in any directory of my laptop, but my html code is present in desktop of my laptop?I will give the complete path like :
"C:\Documents and Settings\DELL\Desktop\FACEBOOK\602.jpg"

As long as you give the correct directory, it doesn't matter where your html & image file resides, they can be in separate directories also. It is also possible to set the image source of any online image to your local html file.
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: inserting image

by gate2013 » Mon Jul 30, 2012 1:54 pm

Thanks sir....
<html>
<body>
<img src="C:\a.jpg">
</body>
</html> but i am getting error in the above code.
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by gate2013 » Mon Jul 30, 2012 2:02 pm

Good evening Sir.I have also tried to insert the image as it was a part of my course/subject. but the following code is not showing any result.
<html>
<body>
<img src="C:\a.jpg">
</body>
</html>
I was trying to identify the error since a week,but i couldn't.Will you help me??
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by gate2013 » Sun Aug 05, 2012 10:33 am

Good afternoon Sir...I am agree with your logic.But I am asking my Image is Present any folder of any other disk drive suppose E:\html and my html code is present in the desktop saved as a html file format, and I want to insert the image...So what I Change I should do in my body part of the html code? Please give a quick reply...........
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by gate2013 » Sun Aug 05, 2012 11:46 am

If I wish to do the same job without changing the location of image,what I have to do?I am asking about the change in my code.
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by gate2013 » Sun Aug 05, 2012 1:58 pm

Good evening sir,

I had got your point, it was known to me. I have followed your suggestion also bot its not fruitful.

I have tried another Code which is specified below...


<html>

<head>

<title> Image Trial</title>

</head>

<body>

<img src="D:\FACEBOOK\facebook-logo.jpg">

</body>


</html>

For your kind information I am specifying that my html code is present in D:\GATE location(i.e in GATE folder of the D drive of my system) named as image.html

Waiting for the reply eagerly
User avatar

gate2013

  • Posts: 7
  • Joined: Sun Jul 29, 2012 2:56 pm

Re: inserting image

by XainPro » Mon Aug 06, 2012 6:27 am

Use Following code this will surly work (but not recommended).
Code: Select all
<html>
<head>
<title>Image Path</title>
</head>
<body>
<img src="file:///C|/a.jpg" />
</body>
</html>
User avatar

XainPro

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


+ Post a reply

1, 2

?>