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 trialWill Snyder
933 PointsI need help with this Inside the <body>, display the image moon.jpg located inside a folder named img.
<!DOCTYPE html>
<html>
<head>
<title>The Moon</title>
</head>
<body>
<img> <src ="moon.jpg/.png">
</body>
</html>
1 Answer
jb30
44,806 PointsTo add an attribute to the img
tag, it would be of the form <img attributeName = attributeValue>
. If the image moon.jpg
was in the same folder as index.html
, you could add the source for the image with <img src = "moon.jpg">
.
A source of src ="moon.jpg/.png"
indicates that there is a folder named moon.jpg
which contains an image named .png
. Instead, the challenge is expecting a folder named img
which contains an image named moon.jpg
.