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

Regarding 'Build a simple website'> text editors and HTML...

I have downloaded the zip file with the images required to build the website. However, they are not appearing on my webpage. Rather, I am just getting a blank box. Do I need to put them in a particular location on my computer in order for them to be located by the text editor/web page? Thanks.

3 Answers

Chase Lee
Chase Lee
29,275 Points

Can you show us your file layout and then show us your links.

When using the "img" tag you need to specify the source of the image file you want to use, this will depend on your file structure.

For example: if you have your image in the same directory as your image you could use; <img src"image-name.jpg" alt"Alternate text" >

if you have you image in a folder call 'images' then you will need to tell the file that your image is within that directory like this; <img src"img/image-name.jpg" alt"Alternate text" >

If your image is in its directory 'images' and your file is also in its own directory you will need to jump up a directory and then back into the images directory using '../'; <img src"../img/image-name.jpg" alt"Alternate text" >

hope this helps.

Hi Chase and Brett, thank you both for your prompt input. I've had a summer off studies, but back on it now, so I apologise for not replying sooner.

Actually I have just solved the problem by moving the img sub-folder to the same folder as the index.html file. Am I correct therefore, that all files or sub-folders need to be held within the same folder in order for them to be picked up by the text editor using the particular command used in the lesson? (For some reason it won't allow me to post the command in this box.)