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

Dillon Cook
Dillon Cook
Front End Web Development Techdegree Graduate 16,531 Points

I'm not sure what I'm doing wrong. Keeps saying I need to enter the correct src value, but the moon displays

<img src="./img/moon.jpg" alt="Moon picture"/>

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


  </body>
</html>

1 Answer

Camilo Lucero
Camilo Lucero
26,552 Points

Using the single dot (.) in a path is a reference to "this" folder, which is unnecessary/redundant (even though it works). You can just use img/moon.jpg instead of ./img/moon.jpg.