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

inside the <body> display the moon.jpg located inside a folder called img.

<body>

</body>

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

  </body>
</html>

1 Answer

Steven Parker
Steven Parker
177,686 Points

Only the properties of an element get assigned (using "="), the tag name itself always stands alone.

Also, they only mention that the image is located in folder but they don't give a full path to it. So you can infer that this will be a relative reference and not an absolute one (so it won't start with "/").