954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HELP! Html image file!

Yo,

Can somebody tell me the code to put an image file in to an html document.
But not from a URL but from a file saved yo my computer!
Thanks ;)

Croft .L
Light Poster
34 posts since Jun 2005
Reputation Points: 11
Solved Threads: 1
 

You have to provide a path to the image. HTML documents use URLs for paths. If the image is in the same directory as your html file, then you use the filename.

The tag is "img":

myImage.jpg

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

You have to upload your image first, you can't just host it off of your computer.

ayksolutions
Light Poster
43 posts since Sep 2005
Reputation Points: 10
Solved Threads: 1
 

If your html page utilizes this image on multiple pages I would move the logic to a css file. It’s also good practice

You could do something like this in a css file if it were a background image or something. Just an example.

body{background: url(path/to/image/on/your/computer/image.gif)  repeat-y;}
Sailor_Jerry
Junior Poster in Training
88 posts since Aug 2005
Reputation Points: 13
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You