Why can’t I display the image selected below in my browser?

Asked

Viewed 61 times

-2

<figure id="centro-distribuicao">
    <img scr="img/centro-distribuicao.png">
    <figcaption>Centro de distribuição da Mirror Fashion</figcaption>
</figure>
  • Guy with only this piece of code has no way to answer you! Put the whole HTML and CSS too. Edit your answer and enter the code

  • If the image with the name centro-distribuicao.png is in the folder img that is inside the same folder that is with the html file was to be displayed correctly. Have a look at here

  • Thank you so much for the help! Unfortunately for carelessness there was a syntax error that I hadn’t noticed! But thank you!

2 answers

3


I noticed your tag is written scr:

The correct is src:

  • 1

    That there.... is written SCR instead of SRC.

  • Exactly that! This is my first code and believe me, I’ve done everything I can to make this image upload, unfortunately, I haven’t fixed the correct writing. Thank you so much! Fixed!

  • It happens, I also got confused quite at first.

-1

Log in to your browser’s Console and go to the Network tab (Network), reload the page and see if there are any loading errors.

If there is, check that the call (link) of the image is correct.

As the friend said above, it is difficult to know only with this block of code, but it is quite likely that the call of the image is referencing the wrong location, perhaps for the simple fact of not having a bar before and the browser use the dynamic path to call the image.

If you put a / it will start from the root to the image path:

    <img scr="/img/centro-distribuicao.png">

It’s just a possibility, maybe not solve. If not, please provide us some additional information.

  • Thank you so much for the help! Unfortunately for carelessness there was a syntax error that I hadn’t noticed! But thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.