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 trialJack Cummins
17,417 PointsWhy is this not working?
The prompt is "Inside the <body>, display the image moon.jpg located inside a folder named img."
The error is: "Make sure you specify that 'moon.jpg' is located inside the 'img' folder."
Why won't this work.
<!DOCTYPE html>
<html>
<head>
<title>The Moon</title>
<img src="moon.jpg">
</head>
<body>
</body>
</html>
3 Answers
Jack Cummins
17,417 Pointsthat's better.
Alejandro Narvaja
Courses Plus Student 7,340 PointsThe idea was to explain to you why it happens and not show the solution immediately. Although Michael explained it much better :)
Jack Cummins
17,417 PointsThat doesn't help me.
Alejandro Narvaja
Courses Plus Student 7,340 Points <body>
<img src="img/moon.jpg" />
</body>
And this?
Alejandro Narvaja
Courses Plus Student 7,340 PointsBecause you need to specify the img folder where the image is located.
Michael Sraj
23,188 PointsMichael Sraj
23,188 PointsThere are 2 issues that I see here, and trust me, I've been where you are so I definitely get it. One is that the img tag isn't located between the body open and close tags(between <body> </body>). The second thing to notice is that the image source doesn't reference the img folder. It would look something like this <img src="img/moon.jpg">. Depending on where the image folder is located, you may require futher markup in front of img/moon.jpg