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

Kim Hyunsung
Kim Hyunsung
1,748 Points

I wrote img tag exactly in between <body> </body> tags and preview also showed image but work keep bummer.

I wrote img tag exactly in between <body> </body> tags and preview also showed image but work keep bummer.

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

1 Answer

Sam Glister
Sam Glister
1,702 Points

Hi Kim,

The issue with your code is with how you have written the path.

So you index.html file is at the root of the project and then the moon.jpg is located one folder deeper in the img folder.

As its only going deeper you don't need './' at that start of the path.

The result should be that your HTML should look like this:

<img src="img/moon.jpg">