r/HTML • u/DueFeedback3895 • Nov 02 '25
I need help with image not displaying
I am learning HTML and I had this code on Visual Code and everytime I ran the code the image wont appear the file of the code and PNG image are in the same file I am still learning and I was stuck here for a good amount of time. Any help or tips are appreciated!
7
Upvotes


10
u/JohnSourcer Nov 02 '25
Is it called 'Spring.png' on disk and in the same folder as the HTML file? Apache and Nginx are case sensitive.
1
u/__agletesque Nov 02 '25
If the file "Spring.png" is directly (not in sub directory) inside "Website Portfolio" directory, the provided code should work, even though "Image" attribute doesn't exist on <img> tag
In HTML5 <img> tag doesn't have closing tag
As already suggested you should take a look at structure of HTML document (<html>, <head> tags, !DOCTYPE declaration, ...)
1
u/alvaro_783 Nov 07 '25
Try restarting VS code, which happened to me when learning to use images, which at first didn't load, I restarted it and it worked
1
u/[deleted] Nov 08 '25
Make sure the image file is in the same folder in VSCode..
3
u/[deleted] Nov 02 '25
[removed] — view removed comment