HTML HTML Basics Images, Text and Links Images and File Paths Challenge

Lynn Collins
Lynn Collins
9,468 Points

Ok so what next?

How do I specify the moon image?

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>The Moon</title>
  </head>
  <body>
<img src="moon.jpg" alt=Provide alternative text for accessibility"/>
  </body>
</html>

2 Answers

Kristina McElveen
Kristina McElveen
152 Points

Hi Lynn,

You are almost there! There is a key thing you are missing. The instructions say that the image is located in a folder by the name of img. So you have to include the path to the moon image. Also, you are a missing quotation in the alt attribute. I hope this helps!

<img src="path to image" alt="Provide alternative text for accessibility"/>
Jamie Reardon
Jamie Reardon
Treehouse Project Reviewer

To expand on Kristina's answer with the code challenge solution in case you still need it:

<img src="img/moon.jpg" alt="Picture of the moon">
Rich Donnellan
Rich Donnellan
Treehouse Moderator 25,699 Points

Thanks, Jamie. However, it's highly advised not to provide direct answers.

Jamie Reardon
Jamie Reardon
Treehouse Project Reviewer

Oh right didn't know that as I've seen others do it. Thanks.

Rich Donnellan
Rich Donnellan
Treehouse Moderator 25,699 Points

No worries! Although helpful in passing the challenge, it doesn't benefit the OP in learning the material.