Click to See Complete Forum and Search --> : need help with pictures in html


swamp_bomber2
11-08-2005, 08:10 AM
[SIZE=3]when i try to make a html with a picture it never works. it shows up as a box with a red x in it. im pretty sure the image name is aright but it just never works (with photos and pics from the web). please help

The Little Guy
11-08-2005, 08:46 AM
How are you writeing the code for it?

rincewind456
11-08-2005, 08:46 AM
whats the code? is the path to the picture correct?

TheBearMay
11-08-2005, 08:50 AM
Couple of possibilities, but the easiest to check is the path to the picture. You can either specify it relative to the HTML document, relative to the root directory, or give it the full http:// path.

So if I have a picture (picture.jpg) stored in the Images directory just off of the root directory, and the HTML file is in another directory I can use src="/Images/picture.jpg" or src="http://mydomain/Images/picture.jpg". If the HTML file is in root I can also use src="Images/picture.jpg", and if the HTML file is in the Images directory I could use src="picture.jpg".

NogDog
11-08-2005, 08:50 AM
<img src="http://www.yoursite.com/img/picture.jpg" alt="My Picture"
width="400" height="300">

If image is in the same directory as the web page, you could do:

<img src="picture.jpg" alt="My Picture" width="400" height="300">

More info at http://www.w3.org/TR/html4/struct/objects.html#h-13.2