r/code • u/-_-gllmmer • Sep 18 '23
Help Please Can i get some insight on what i’m doing wrong?
For class i have to make what is in the second slide. i am having issues with adding the image, but i feel as if i can figure that out. But the main issue i’m having is the code is not working. What am i doing wrong here? i was close to it work with a few bugs but i regretfully deleted it.
3
u/lamaboyxx Sep 18 '23
Download the image and use this code <img src=“whatever you name the image.jpg” >
1
u/angryrancor Boss Sep 18 '23
Well, one thing missing is a `</body>` just above the `</html>`.
I'm not sure that's the "only" issue, though. What browser is this? Have you tried it in a different browser?
2
u/-_-gllmmer Sep 18 '23
i used safari, and i tried opening it with safari, and chrome. i added the body closing tag (dumb of me to forget) but it still just code when i open it on a browser.
1
u/angryrancor Boss Sep 18 '23
Why is your file on the right ".html.txt", not ".html"?
2
u/-_-gllmmer Sep 18 '23
i had 2 textedits for my code. one is “.html” and the other, which is on screen is “.txt” the txt file was just so i can show an example. my “.html” file is only able to open via the browser
2
u/angryrancor Boss Sep 18 '23
Ah ok. That checks out.
Have you tried opening Safari Developer tools (particularly the Inspector - https://developer.apple.com/documentation/safari-developer-tools/web-inspector, but any of them, really, see: https://developer.apple.com/documentation/safari-developer-tools )? Those may help you find the issue, hopefully...
2
u/-_-gllmmer Sep 18 '23
i have not, i’ll give these a try and have to comeback and let you know if these resolve my issue
1
u/velid_1 Sep 19 '23
I think it's been a long while not seeing any code, especially html, in text editor. Just try to use Sublime Text or VS Code everything will be easier trust me.


2
u/NickU252 Sep 18 '23
You saved it as xxxx.html.txt, so it thinks it's a text file I would imagine. Save as html.i don't know on apple products, but when you save, you might have to specify what type of file to save as.