Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Graphics, Flash and Multimedia _ my picture wont show up! help please

Posted by: michy Sep 17 2011, 04:35 PM

I am taken a html course for school and I have to design a webpage for my assignment. I did everything and now I am adding the picture and I'm not sure why it is not showing up. Both the HTML and JPG image are in the same folder under case2, which is the folder my teacher gave us. I used the code...



<h1><img src="macbeth.jpg" alt="macbeth" /></h1>

I even tried making a new images folder and doing

<h1><img src="images/macbeth.jpg" alt="macbeth" /></h1>

but nothing seems to work.

If anyone has a solution, please help:/ thank you so much!

Posted by: pandy Sep 17 2011, 04:37 PM

Is the image named exactly like that, all lower case?

See http://htmlhelp.com/faq/html/images.html#broken-image .

Posted by: michy Sep 17 2011, 04:40 PM

Yeah it is all lowercase and I even tried typing macbeth.JPG. but nothing happened. This is so confusing. I am going to explore that htmlhelp faq and little and see if I can figure something out. Thank you for your time.

Posted by: michy Sep 17 2011, 04:42 PM

It says my file is a jpeg file, is that the same as jpg?

Posted by: pandy Sep 17 2011, 04:47 PM

No, not as far as the server is concerned. Rename it to .jpg . FYI that goes for any file type that can have different extensions, like HTML files. xxx.html and xxx.htm are two different files, even if both extensions mean they are HTML files. The URL must be correct to the letter, case and all. The letter bit is true on Windows also, just not the case bit.

Posted by: michy Sep 17 2011, 04:53 PM

Okay I renamed it macbeth.jpg but under type it says jpeg image. and it is still not showing up. I'm really not sure what is going wrong. I have the html in a zipped folder also. should I delete that out of the zipped folder and then try?

Posted by: michy Sep 17 2011, 04:55 PM

I just deleted the zipped folder, and everything is in the same folder. urgh.

Posted by: jimlongo Sep 17 2011, 05:06 PM

Also just wondering, why do you have an H1 tag around the image?

Posted by: michy Sep 17 2011, 05:33 PM

That is what the book says to do, and in the book there is a picture of previous work, and that is what it is also. I dont know why, but thats it. I would love to just do <img src=TINYPIC URL> lmfao, but nooo. my teacher wants it her way ahha

Posted by: pandy Sep 17 2011, 05:42 PM

I guess it's supposed to be the heading.

It sounds like you haven't put this on the web so you can give us a link. Attach the whole HTML file to your next post or paste the markup in, all of it.

Another thing, what browser do you use and what do you get instead of the image? The alt text? An error message? Nothing?

Posted by: michy Sep 19 2011, 04:21 PM

this is what i have...


<html>

<head>

<!--
New Perspectives on HTML and XHTML 5th Edition
Tutorial 2
Case 2

Fiddler Page 1
Author: Michelle Primavera
Date: September 19, 2011

Filename: slide1.htm
Supporting files: back.jpg, end.jpg, fiddler.jpg, forward.jpg, slide1.jpg,
start.jpg, thumb1.jpg - thumb6.jpg
-->

<title>Fiddler: Slide 1</title>
</head>

<body>
<div>
<img src="fiddler.jpg" alt="Fiddler on the Roof" />
<hr />

<img src="home.jpg" alt="home" />

       

<img src="start.jpg" alt="start" />
<img src="back.jpg" alt="back" />
<img src="forward.jpg" alt="forward" />
<img src="end.jpg" alt="end" />

<br />

<img src="thumb1.jpg" alt="slide1" />
<img src="thumb2.jpg" alt="slide2" />
<img src="thumb3.jpg" alt="slide3" />
<img src="thumb4.jpg" alt="slide4" />
<img src="thumb5.jpg" alt="slide5" />
<img src="thumb6.jpg" alt="slide6" />
</div>
<hr />

<div>
<img src="slide1.jpg" alt="slide1" />
</div>
<blockquote>
<p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p>
</blockquote>

</body>

</html>


and then I have to have pictures show up in the img src ones but they aren't showing up.and in the folders that is the names of them.

Posted by: jimlongo Sep 19 2011, 04:28 PM

If the html file and the images are in the same folder they should show up.

Otherwise if you have the images in a different folder (like "images") then you'd need to put that in the src address
<img src=images/thumb1.jpg>


Posted by: michy Sep 19 2011, 04:30 PM

but they are in the same folder. Idk why they aren't working. I am getting so frustrated. Idk what to do.

Posted by: michy Sep 19 2011, 04:33 PM

IPB Image


see they are all in the same folder! :/

Posted by: jimlongo Sep 19 2011, 04:54 PM

Wheres the HTML document? It needs to be in the folder.

Oh Wait, is home the document. Try calling it index.html

Posted by: pandy Sep 19 2011, 05:06 PM

OK, now I'm confused. There is no reference to macbeth.jpg in the HTML you posted. But there is a bunch of other images. Are you saying none of them are showing up?

You let Windows hide the file extensions, so it's hard to see in the screen cap if everything is alright. Which is the problematic HTML file, home.html? You should turn on file extensions. Hiding them is bad for you.

This is not related to your problem, but you should use a doctype. If you aren't really writing XHTML you shouldn't use those closing slashes in the IMG and HR tags.

HTML

CODE
<img src="" width="" height="" alt="">


XHTML
CODE
<img src="" width="" height="" alt="" />

Posted by: pandy Sep 19 2011, 06:01 PM

Sorry, jimlongo already said half of that. Slow typer, me. blush.gif

Posted by: michy Sep 19 2011, 06:19 PM

yeah pandy sorry I was doing a macbeth assignment, but now I am doing a different assignment, and its not working on this assignment either.

Posted by: pandy Sep 19 2011, 06:24 PM

None of the images work?

Turn on file extensions. Maybe the images are called .jpeg again.

Open any folder and go to the Tools menu and find Folder Options. On the View tab, check that "Hide extensions for known file types" is NOT ticked. This is on XP. It may be different on later OSes, but shouldn't be to far off.

Posted by: michy Sep 19 2011, 06:33 PM

Okay I did that...
now I use real time editor on IE to type of the html..
How should it look now?
<img src="home.jpg" alt="home" />

is that the correct format of it ^

Posted by: michy Sep 19 2011, 06:48 PM

Idk why my teacher wont let me just upload the pictures and use the url's. Idk why she is making me go through f---ing documents. excuse my language.

[mod: language redacted]

Posted by: pandy Sep 19 2011, 06:57 PM

QUOTE(michy @ Sep 20 2011, 01:33 AM) *

Okay I did that...
now I use real time editor on IE to type of the html..
How should it look now?
<img src="home.jpg" alt="home" />

is that the correct format of it ^


If the image is in the same folder and is called exactly "home.jpg". I don't know if that's true or not.

You still shouldn't use that slash if you don't write XHTML and it doesn't look like you do.

Posted by: pandy Sep 19 2011, 06:58 PM

QUOTE(michy @ Sep 20 2011, 01:48 AM) *

Idk why my teacher wont let me just upload the pictures and use the url's. Idk why she is making me go through f---ing documents. excuse my language.


If you can't make it work on your hard drive it won't work on the server either, so that doesn't matter.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)