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 trialKatrine AMS Guirguis
2,587 Points~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??
<!DOCTYPE html>
<html>
<head>
<title>The Moon</title>
</head>
<body>
<img src="images/moon.jpg">
</body>
</html>
3 Answers
Cameron Childres
11,820 PointsHi Katrine,
Check the folder name in your file path for the img src attribute. The challenge says it's in the folder named img
.
Adam N
70,280 PointsIf the folder was named bob, the the path would be:
"bob/moon.jpg"
Katrine AMS Guirguis
2,587 PointsBut on my code, I set it as “images/moon.jpg” and it still marked it wrong...
Adam N
70,280 PointsKatrine 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
11,820 PointsI 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.
Katrine AMS Guirguis
2,587 PointsIt is telling me “Make sure you specify that 'moon.jpg' is located inside the 'img' folder.” but I don’t know how to...