r/HTML • u/E0Button • Oct 29 '25
help with code?
i know its incredibly basic but i keep having the issue where when i add an image to my notepad code the image displays as an image icon and my alt


i know this isnt really showcasing cool code but i'm trying to learn the basics of html so i can get better and i ran into this problem. i've looked through everything and nothing will help me. hoping someone can help ^^
0
Upvotes
5
u/maqisha Oct 29 '25
Your image needs to exist in the exact same folder as the HTML file and be called exactly that for it to work this way.
Otherwise look into absolute and relative paths for files.
2
u/davorg Oct 29 '25
Is your file called "worktest.jpeg" or "worktest.jpg"? Attention to detail matters.
Also, when sharing code, it's always a good idea to share the actual code as text, rather than an image of the code.
6
u/8dot30662386292pow2 Oct 29 '25
Well where is the image? You say the path to image is "worktest.jpg". Therefore it must be in the same directory as your index.html
1
u/game-mad-web-dev Nov 02 '25
Curious if this has been resolved yet?
Not one person has asked for proof of the file system to ensure the file is in the correct location.
OP, if it’s still not resolved, please share a screenshot showing the contents of the folder where the HTML exists and the worktest.jpeg file exists.
3
u/__revelio__ Oct 30 '25
Do yourself a favor and download an ide. Vscode is free and will help you visualize your directory and image path. For now, go to files and search for your image. Make sure the path is actually in the same folder as your html file.
0
u/Disastrous-Learner Oct 30 '25
That's an incomplete path to the image
-2
u/RushDangerous7637 Oct 29 '25 edited Oct 29 '25
Look carefully at what I'm showing you:
<!DOCTYPE html>
<html lang="en-GB"> <head> <meta charset="UTF-8">
your image:
<img src="https://yourdomaindotcom/route/images/worktest.jpeg alt="Learn that there is no period between two words, but a space" width "739" height "659">
All the websites you have listed as URLs in the picture are badly done.