Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML <img> tag is not working

Tags:

html

image

xhtml

I am using following simple HTML :

   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <body>
            <img src="loading.gif" alt="MISSING GIF"> 
            <img src="j.JPG" alt="MISSING JPG">              
    </body>
    </html>

loading.gif and j.jpg are present in same directory as html file. loading.gif is displayed fine in ie 8 but j.jpg doesn't load.

When I use firefix, both images display correctly.

Please help

like image 934
Aman Khanna Avatar asked Jan 26 '13 19:01

Aman Khanna


2 Answers

Check that JPG file extension is uppercase in the file system. I suspect that it is lowercase. Also be sure to close the image tag.

<img src="j.jpg" alt="MISSING JPG"/> 
like image 118
Kevin Bowersox Avatar answered Oct 23 '22 22:10

Kevin Bowersox


<img src="loading.gif" alt="MISSING GIF">

will be like this

<img id="ImgEmployee" src="Photos/loading.gif" alt="MISSING GIF" />
like image 25
A.Goutam Avatar answered Oct 23 '22 20:10

A.Goutam