unable to load image file using <img> tag

0 votes
I have used the following piece of code to load the image file:

<img src="images/OIP.jpg"/>

The image is in the same root folder and inside images folder. But when a check the code in browser, the image file is not loaded and throws an error : Failed to load resource: net::ERR_FILE_NOT_FOUND

I have verified the page source, and the image is present in the specific path.
Oct 7 in HTML by Abirami
• 120 points
65 views

1 answer to this question.

0 votes

This error means that file was not found. Either path is wrong or file is not present where you want it to be. Try to access it by entering source address in your browser to check if it really is there. Browse the directories on server to ensure the path is correct. You may even copy and paste the relative path to be certain it is alright.

OR 

Use <img src="images/OIP.jpg"> not as <img src="images/OIP.jpg"/> Remove the / in the path.

answered Oct 7 by Niroj
• 78,480 points

Related Questions In HTML

0 votes
0 answers

How to do calculation in PHP using a csv file for retrieving data?

Morning, I have a csv file and i ...READ MORE

Feb 11 in HTML by anonymous
• 140 points
379 views
0 votes
1 answer

How to Identify Web Element( Button) when there are multiple buttons without any ID

Hi Gangadhar, Do you need the HTML code to ...READ MORE

answered Feb 10 in HTML by Roshni
• 6,190 points
261 views
0 votes
1 answer

I've a query for <form>tag

That might be because button inside form ...READ MORE

answered Nov 2 in HTML by sindhu
63 views
0 votes
1 answer

How blockchain hides it's HTML source?

When you click View Source, you see ...READ MORE

answered Jul 17, 2018 in Blockchain by Shashank
• 10,400 points
196 views
0 votes
2 answers
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,680 points
105 views
0 votes
1 answer

Using Post and Get for Embedded System Communication

Twitter would be a great place to ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
149 views
+1 vote
1 answer

How can i create simple register form using html and css?

Html5 contains lots of elements using which ...READ MORE

answered Jan 31 in HTML by Niroj
• 78,480 points
1,323 views
0 votes
1 answer

How to align a <div> to the middle (horizontally/width) of the page?

Hello Kartik, position: absolute and then top:50% and left:50% places the top edge ...READ MORE

answered Apr 23 in HTML by Niroj
• 78,480 points
57 views
0 votes
1 answer