Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Structure the Image Gallery

My Picture Does not show

my image just comes up as a image error icon

Jacobus Hindson
Jacobus Hindson
14,429 Points

Hi Yudi,

Could you please post your code. There is some tips about posting code in the Markdown Cheatsheet or Getting Help video.

<section> <ul> <li> <a href = "img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt =""> <p>Test Image</p> </a> </li> </ul> </section>

I inserted the html page now back into the image folder and the preview does not give the page not found error anymore but the image still as a funny error symbol

Here is the updated code but there is still an error

<section> <ul> <li> <a href = "img/numbers-01.jpg"> <img /src="img/numbers-01.jpg" alt=""> <p>Test Image</p> </a> </li> </ul> </section>

Thank You all for helping I got it to work I am new to treehouse and I got so many comments so quickly i am really impressed with these forums.

Yeah, the treehouse forums are REALLY useful if you have an error, glitch, or bug

6 Answers

Jacobus Hindson
Jacobus Hindson
14,429 Points

Hi Yudi,

Place a / in front of img in you src.

This has to do with the file path to the image. ( src="myImage.jpg" ).

Is your image in the same directory as your html file? If it is not, you need to add a folder path. ( src="imagesFolder/myImage.jpg" ).

Copy and paste your code and describe where your image is in relation to your html file so I can help out.

That or maybe the space between your 'alt' attribute and the equal sign could be causing problems.

i removed my html file from the image file and now the preview says page not found

Are you sure that the image is where @ img/numbers-01.jpg? Otherwise, here is the code with a few syntax fixes

<ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt="Numbers-01"> </a> <p>Test Image</p> </li> </ul> </section>

Shreyash Agarwal
Shreyash Agarwal
9,843 Points

Try setting a float attribute to the image via css so that it actually shows up. I think the problem here is that you're trying to get two objects ( the image and the paragraph) under the same anchor which is causing the problem.

I too am having trouble with seeing my image

I too am having trouble with seeing my image

It happened at first and i got it to work by messing around but with my second picture i am still having this error