resevil239 resevil239 - 4 years ago 64
HTML Question

adding an image from my computer in html

I'm following online tutorials to start learning HTML and I'm having trouble adding an image. What I'm doing is just typing into a txt (renamed as .html and with UTF-8 encoding, per the tutorial's instructions) document, then checking to see the code changes work properly by opening. However I cant seem to get the image to load properly when testing it, no matter what I do. Here is what I have in the text document:

<img src="C:\users\jason\desktop\website\curved.jpg">

I double checked that the path is correct, everything is spelled correctly, and that image is in the same folder as the html document. So what am I doing wrong here?

Answer Source

Try using the file:/// protocol if you want to link to local files.

<img src="file:///C:\users\jason\desktop\website\curved.jpg">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download