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 trialHayden Cox
5,276 PointsI answered the first question wit, " <img src="../img/moon.jpg>" and it counts as wrong? Where did I make a mistake?
The question: Inside the <body>, display the image "moon.jpg" that came from the "img." folder and I provided the answer of <img src="../img/moon.jpg" and it marked it wrong and a supervisor could not tell what I did wrong so what did I do?
<!DOCTYPE html>
<html>
<head>
<title>The Moon</title>
</head>
<body>
<img src="../img/moon.jpg">
</body>
</html>
1 Answer
connor dawson
18,121 PointsIn the case for this question the ../ isn't required but usually it would be i'm guessing this is just a simplified question to display how the folder and image name are placed. ../ means you move out of the folder you are already in so for this question they are assuming you don't have to do that.
<!DOCTYPE html>
<html>
<head>
<title>The Moon</title>
</head>
<body>
<img src="img/moon.jpg">
</body>
</html>
Moderator Edit: Moved response from Comment section to Answers
Loris Guerra
17,536 PointsLoris Guerra
17,536 PointsYou are correct here. The real solution should be the path to the file, meaning that one of the following should be correct. <img src="../img/moon.jpg"> <img src="./img/moon.jpg">
Probably for this exercise they just simplified the answer :)