I've been trying to display a html image on my browser,but it won't just display and I don't know why. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I've been trying to display a html image on my browser,but it won't just display and I don't know why.

<!DOCTYPE html> <html> <head> <title>Untitled</title> <meta charset="UTF-8"/> <link rel="stylesheet" href="" type="text/css"/> </head> <body> <div align= "center"> <img src="Screenshot_20200225-200205(1).png" width= "300" height= "300"> </div> </body> </html>

21st Mar 2020, 9:56 AM
Chisom David
Chisom David - avatar
41 Answers
+ 8
Chisom David it wont work for an image from your phone here, except you host the image online,, The easiest way to do that is to get a Dropbox app, upload your choice image on dropbox then copy the link an paste it on your image tag here and your image will show up..
21st Mar 2020, 10:38 PM
ugochukwu Joseph
ugochukwu Joseph - avatar
+ 7
Did you close the body and HTML tag? And also, does it display any image icon?
21st Mar 2020, 9:57 AM
Taranjeet
Taranjeet - avatar
+ 4
Sure I did
21st Mar 2020, 9:57 AM
Chisom David
Chisom David - avatar
+ 4
Yh it displays the img icon
21st Mar 2020, 10:00 AM
Chisom David
Chisom David - avatar
+ 4
Then, it means that the image was not found..
21st Mar 2020, 10:01 AM
Taranjeet
Taranjeet - avatar
+ 3
Does it display any image icon?
21st Mar 2020, 9:58 AM
Taranjeet
Taranjeet - avatar
+ 3
You will have to give a proper path on your device.
21st Mar 2020, 10:02 AM
Taranjeet
Taranjeet - avatar
+ 3
But why, cause I saved the image in the same folder with the html file
21st Mar 2020, 10:03 AM
Chisom David
Chisom David - avatar
+ 3
How do I do that
21st Mar 2020, 10:03 AM
Chisom David
Chisom David - avatar
+ 3
Try closing the img tag
21st Mar 2020, 10:04 AM
Taranjeet
Taranjeet - avatar
+ 3
Ok
21st Mar 2020, 10:05 AM
Chisom David
Chisom David - avatar
+ 3
Done but nothing changed ☹️
21st Mar 2020, 10:07 AM
Chisom David
Chisom David - avatar
+ 3
If you are on your PC or laptop then check the console. You might find some information there. Press F12 to check the console.
21st Mar 2020, 10:09 AM
Taranjeet
Taranjeet - avatar
+ 3
Am using my mobile phone
21st Mar 2020, 10:10 AM
Chisom David
Chisom David - avatar
+ 3
Close the img tag
21st Mar 2020, 12:19 PM
iKonSive
iKonSive - avatar
+ 3
Anchor an text to it, such as "waiting to load" , use (anc). If it shows this text, then the only explanation to this dilemma is that the file with the given link is non-existing.
21st Mar 2020, 8:41 PM
User X
+ 3
Ok thanks
21st Mar 2020, 10:41 PM
Chisom David
Chisom David - avatar
+ 2
Chisom David I tried the code on my laptop. The code is working. Check if the path of the file is correct.
21st Mar 2020, 3:04 PM
Taranjeet
Taranjeet - avatar
+ 2
1. Check the Syntax 2. Check the link 3. If the link works check if the image exists or is corrupted 4. If nothing works send me a msg
21st Mar 2020, 5:53 PM
Vasilis Fagogenis
Vasilis Fagogenis - avatar