How can I insert Images in HTML?
Asked by
Link (
327)
March 31st, 2009
I’m learning to use HTML. I’m trying to insert an image that is saved in the “My Pictures” folder of my computer, but for some reason the picture doesn’t show up when I preview the code in the web browser. What am I doing wrong?
Observing members:
0
Composing members:
0
5 Answers
<img src=“image url or directory”></img>
Most likely the image has not been uploaded to the web server.
<img src=“C:/Documents and Settings/Link/My Documents/My Pictures/photo.jpg”>
—
That will only work on the browser on your PC.
As a general rule, you should eschew the use of plain spaces in your url… so you could encode those above as %20’s… like this:
<img src=“C:/Documents%20and%20Settings/Link/My%20Documents/My%20Pictures/photo.jpg”>
—
If you want a browser on another PC to see your photo, you will need to place a copy in a web server-visible directory and use a server-based url instead.
Kinda silly but back like 11 years ago when i was diggin into html for the first time i used http://www.funkychickens.com/main.asp
to get me started haha. The site is a bit outdated now but its great for a new learner and to get a feel for things. Especially if you are making a very simple page. Once you get more familiar with HTML i’d suggest trying to dig a little deeper into it and learning whats right and wrong. Which you can at w3school.com Good luck!
Thanks everyone. This clears things up a lot.
-Link
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.