Search code examples
html

why isn't my image showing up in html?


I'm trying to add an image to my html page. It should be fairly simple. However, the image refuses to show up.

here is the html

        <img src="/images/eiffel.jpg" alt="eiffel">

In safari all i get is a question mark. In chrome it is just an icon with the alt. That is the directory where the image is and my IDE autocompletes the photo name so I know i'm in the right place. So why isn't it showing up??


Solution

  • Add 2 dots behind it will work, if your images folder is in the an upper folder referring to your webpage.

    <img src="../images/eiffel.jpg" alt="eiffel">