944,171 Members | Top Members by Rank

Ad:
Sep 10th, 2005
0

HELP! Html image file!

Expand Post »
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
Similar Threads
Reputation Points: 11
Solved Threads: 1
Light Poster
Croft .L is offline Offline
34 posts
since Jun 2005
Sep 10th, 2005
0

Re: HELP! Html image file!

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":

<img src="myImage.jpg">
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Sep 10th, 2005
0

Re: HELP! Html image file!

You have to upload your image first, you can't just host it off of your computer.
Reputation Points: 10
Solved Threads: 1
Light Poster
ayksolutions is offline Offline
43 posts
since Sep 2005
Sep 13th, 2005
0

Re: HELP! Html image file!

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.
HTML and CSS Syntax (Toggle Plain Text)
  1. body{background: url(path/to/image/on/your/computer/image.gif) repeat-y;}
Reputation Points: 13
Solved Threads: 2
Junior Poster in Training
Sailor_Jerry is offline Offline
88 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: How to view source code of a nav bar?
Next Thread in HTML and CSS Forum Timeline: Validate textboxes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC