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

Sam Ketchum
Sam Ketchum
2,558 Points

why is the src not recognized as correct?

I have input my code as <img src=" \img\moon.jpg " alt= "the moon" > and it is coming back as incorrect, suggesting that I check the src value.

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>The Moon</title>
  </head>
  <body>
  <img src= "\img\moon.jpg"  alt= "the moon" >
  </body>
</html>

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! First, you're doing great, but your src attribute is a little off. Besides not needing the first \, your slashes should be forward slashes.

The src you are looking for is:

src="img/moon.jpg"

Hope this helps! :sparkles:

Sam Ketchum
Sam Ketchum
2,558 Points

It worked - Thank You!