Click to See Complete Forum and Search --> : help! can't display image with img tag!


vr84
April 28th, 2008, 05:36 PM
This is my code:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD/XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml11-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>Linking</title>
</head>

<body>

<!--image tag-->
<img src=”image1.jpg” alt="display this, if image not displayed" width="829" height="741" />

</body>

</html>


When I open the html file on my computer it doesn't display the picture. The picture is in the same folder as my html file. I've also tried it with a gif file. Am I doing something wrong?

PeejAvery
April 28th, 2008, 07:33 PM
You will notice that the double-quotes around image1.jpg are not plain text double-quotes. They have a slant to them. Usually this is from using some richtext editor. This will cause the browser to see a different source that what you see. In your case, the browser was seeing the following.

file:///path/to/file/”image1.jpg”
Instead of...

file:///path/to/file/image1.jpg