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

Arvind Kevin Arjun Sharma
Arvind Kevin Arjun Sharma
8,272 Points

Sombody please help me with the answer to pass this, i'm stressing me out so much for 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" alt="A picture of the moon"/> </body> </html>

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>The Moon</title>
  </head>
  <body>
    <img src="moon.jpg" alt="A picture of the moon"/>
  </body>
</html>
Peter B. Sims
Peter B. Sims
Courses Plus Student 2,896 Points

Arvind, thank you! I'm so happy you went before me in taking this course. Your questions have really helped me out because I have had the same ones and you have generated answers. Thank you Team Treehouse too for the assistance.

6 Answers

Hi, you are very close. You just need to add img/ before moon.jpg, so it knows to look inside the "img" folder. Like so:

img/moon.jpg

Good luck!

Happy to help!

why is is the path NOT "img./mmon.jpg" ????

the name of the folder is "img."

Challenge Task 1 of 3

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

Challenge Task 2 of 3

Next, provide the browser alternative text describing the image.

Well done! You`re doing great Ary!

<!DOCTYPE html> 
<html>
  <head>
    <title>The Moon</title>
  </head>
  <body>
     <img src="img/moon.jpg" alt="The Moon">
  </body>
</html>
Mindaugas Krivickas
Mindaugas Krivickas
9,853 Points

Try this line of code: <img src="img/moon.jpg">

Challenge Task 3 of 3

Finally, add a caption that describes the image.

<!DOCTYPE html> 
<html>
  <head>
    <title>The Moon</title>
  </head>
  <body>
    <figure>
            <img src="img/moon.jpg" alt="The Moon">
            <figcaption>Virtual reality users, The Moon by Ary de Oliveira.</figcaption>
    </figure>
  </body>
</html>
Rob Allessi
Rob Allessi
8,600 Points

Greetings Arvind Kevin Arjun Sharma

Try removing the alt text portion of your code and run it again. Also, you need to indicate the folder in which the moon.jpg file resides (file path).

<!DOCTYPE html> <html> <head> <title>The Moon</title> </head> <body> <img src="img/moon.jpg"> </body> </html> i have used this to pass good luck guys