image does not appear in html 5

Asked

Viewed 1,728 times

3

I’m trying to put an image in a panel using HTML5 but it’s not recognizing.

In the standard panel was this way:

<a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>MobiAbert</span> </a>

inserir a descrição da imagem aqui

But I want to put the image of the company instead of the name with an icon on the side. I made the following change in line:

<a href="index.html" class="site_title"> <img src="imagens/logomobi.png"/> </a>

But the image doesn’t appear and stays that way:

inserir a descrição da imagem aqui

How can I fix this?

  • 3

    Probably the image path is wrong and is returning a 404 response. Already checked the developer tools in your browser?

  • 1

    u have already checked if the image extension is . png or if it is gif or jpg? This should help you https://answall.com/questions/198422/footpath-to-foots-html-css-php-etc

  • Maybe you switch to . jpeg works... I had this same problem and I made this change and it worked...

1 answer

1


Do it like this

<img src="imagens/foto.png" alt="Imagem de página não encontrada" width="330" height="202" />

The above example loads the image called "photo.png" that is inside the folder "images".

Heed: The "images" folder must be in the same folder as your. html file.

And now a little help

Tag The main attributes of the tag are:

src: indicates the image path within the web site folders.

alt: sets an alternative text that will be read by voice browsers, also sets a text that will be displayed if the image does not load.

height: sets the height of the image. It is important to set this attribute so that the browser "reserves" the space in the layout until the image is loaded.

width: sets the width of the image. It is important to set this attribute so that the browser "reserves" the space in the layout until the image is loaded.

border: although not supported in HTML5, it may be necessary to remove the edge of images that are links (border="0").

Browser other questions tagged

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