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 HTML Basics Images, Text and Links Images and File Paths Challenge

~Images.HTML~(Code challenge: Images and File Paths Challenge)

“Inside the <body>, display the image moon.jpg located inside a folder named img” is the question. What did I do wrong??

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>The Moon</title>
  </head>
  <body>
<img src="images/moon.jpg">
  </body>
</html>

3 Answers

Cameron Childres
Cameron Childres
11,820 Points

Hi Katrine,

Check the folder name in your file path for the img src attribute. The challenge says it's in the folder named img.

If the folder was named bob, the the path would be:

"bob/moon.jpg"

But on my code, I set it as “images/moon.jpg” and it still marked it wrong...

Katrine Guirguis In this challenge, the folder isn't named images. It's named img. The instructions:

Inside the <body>, display the image moon.jpg located inside a folder named img.

Cameron Childres
Cameron Childres
11,820 Points

I set it as “images/moon.jpg” and it still marked it wrong...

images/moon.jpg is incorrect because that is not the location of the file.

moon.jpg is located in a folder called img, not images. Precise spelling matters, the system won't guess that when you type images you actually mean img.

It is telling me “Make sure you specify that 'moon.jpg' is located inside the 'img' folder.” but I don’t know how to...