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

Andy Nguyen
Andy Nguyen
693 Points

Having trouble with image.

<section> <ul> <li> <a href="pics/numbers-01.jpg"> <img src="pics/numbers-01.jpg" alt=""> </a> </li>
</ul>
</section> Was practicing and testing, but this part that picture didn't pop up. Did I do anything wrong? or is it because of the thing he kind of talked about how the file cant be found? thanks

Andy Nguyen
Andy Nguyen
693 Points

Okay, so I just tested on workspace it worked. I was testing on Brackets and picture didnt pop up when I run chrome or any browser, also Notepad++. Any ideas?

Dan Barrett
Dan Barrett
10,450 Points

Make sure that the file your working on is in the same place your folder for 'pics' is because the file your woking on will look at the 'pics' folder and see inside of it and then looks for 'numbers-01.jpg' providing that is the correct name for it then it will show up :)

2 Answers

Are you sure that your folder "pics" was on the same level as the html in which you referred to the image? That's the only issue I can imagine to show up.

Andy Nguyen
Andy Nguyen
693 Points

Hi Valerie, thanks for your comment. I'm honestly 100% not sure. what do you mean on the same level? :x

@andy - same level means are all your files (in this case, images) in the same folder as your css? I'm assuming that they aren't and are probably in an img folder somewhere that is separate from your css

if they were on the same level or folder as your css, you can get away with saying img/mypic.jpg

if they are not on the same level, you are basically using your path to say, get out of the css folder, look in the img folder and find mypic.jpg (i.e. /img/mypic.jpg)