Image inserted in html does not want to appear

0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD> 
<TITLE>Segundo HTML</TITLE>
</HEAD>
<BODY>
<P> Uma imagem </P>     
       <img src="C:/Users/Lucas/Pictures/Ogame.jpg" width="800" height="600">
</BODY>
</HTML>

The code above is not displaying the image, while running the html in the browser appears only the outline of the image with that error icon in it.

I do not know where I'm going wrong ...

    
asked by anonymous 04.03.2018 / 12:59

2 answers

1

If you are loading this HTML locally without using a server, you can only change the src of the image to:

src="file://C:/Users/Lucas/Pictures/Ogame.jpg"

However, for security reasons, browsers will not allow this the moment you publish to a server.

So I recommend you put the image in the same directory as your HTML or subdirectory and reference it from there:

src="Ogame.jpg"
    
04.03.2018 / 13:16
1

Is your .html file in the Lucas folder? If it's try to put it like this:

<img src="Pictures/Ogame.jpg" width="800" height="600">

If it does not work check if the image is .jpg or if it is from another extension such as .png     

04.03.2018 / 13:42