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 Styling Web Pages and Navigation Style the Image Captions

Tanner Marsh
Tanner Marsh
913 Points

I have not been able to get pictures to appear on my blog and would like some help with it. Thanks, Tanner

<section> <ul> <li> <a href="IMG_2939.jpg"> <img src="IMG_2939.jpg" alt=""> </a> </li> </ul> </section>

Allison Hanna
Allison Hanna
36,222 Points

Where are your images stored? If they aren't in the exact same folder as your html file, then you may need to be more specific about the src value of the image.

2 Answers

Vilius Grižas
Vilius Grižas
2,753 Points

If I understand correctly what you're doing is trying to put a picture as a link to the same picture right?

One of the posibilities why your code doesn't work is because maybe your IMG_2939.jpg file is not in the same folder as your HTML file.

You can also go into your computer file and copy the source path and paste it after <img > it's going to look something like this <img src= "c://user/cassie/pictures/quotes/mondaay-quote.png"> that's the long way of doing things.

The other way is to add the image to a folder in your editor, you can call the folder for example images. and you'll write the code like this <img src="images/(your-pictures- name.png)">