Forum Moderators: open

Message Too Old, No Replies

Why does this work?

<image src="thisimage" />

         

monkeythumpa

9:55 pm on May 12, 2005 (gmt 0)

10+ Year Member



I accidently typed in <image src="image.jpg" /> and to my surprise it worked. Are there alternate tags for XHTML that I don't know about?

D_Blackwell

12:02 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It can only work by chance. It's probably not that uncommon on little one page sites. More likely to find background.jpg animation.gif and such. Still, it's just chance. How many people use a directory called images for their graphics?

tedster

12:13 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you saying that you typed out <image> in full, rather than <img> and it still works?

D_Blackwell

12:35 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wish that I could edit the previous post, since I looked without seeing.

A quick test with <image src=""> seems to work in Firefox and IE?

encyclo

1:12 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In Firefox it probably works beause
<image src="">
is used in XUL (which is used to build the Firefox interface and extensions):

[mozilla.org...]

For IE, it may well be that they support it as part of their usual thoroughness in supporting broken markup. I'm not aware of

<image src="">
being part of any spec, but if you find that older browsers (such as Netscape 3 or 4) support it, it may well have once existed as a non-official extension to an earlier standard.

iamlost

3:27 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Further to encyclo's comments: <image> is a legacy element (whether it works because of legacy support or xul or other reasons I don't know). See following references:

HTML+ Discussion Document - November 8, 1993
[w3.org ]

HTML 2.0:
[w3.org ]

IMAGE
This allows you to specify an image field upon which you can click with a pointing device. The SRC and ALIGN attributes are exactly the same as for the IMG and IMAGE elements.

IMG: Embedded Images
Status: Extra

The IMG element allows another document to be inserted inline. The document is normally an icon or small graphic, etc. This element is NOT intended for embedding other HTML text.

Browsers which are not able to display inline images ignore IMG elements. Authors should note that some browsers will be able to display (or print) linked graphics but not inline graphics. If the graphic is essential, it may be wiser to make a link to it rather than to put it inline. If the graphic is essentially decorative, then IMG is appropriate.

Server-side image maps (ismap) appear by HTML 2.0; <fig> (figure) appears as an initial client-side image map by HTML 3.0; and by HTML 3.2 the use of map with usemap appears as client-side image map to complement the server-side ismap and <image> seems to disappear somewhere along the way without comment. (<fig> is gone by HTML 4.0 also without comment).

I note that <image> appears to have (legacy?) support in O, FF, and IE. <fig>, however appears to be lost forever.

monkeythumpa

5:26 am on May 13, 2005 (gmt 0)

10+ Year Member



Yeah I typed <image src= instead of <img src=

Interesting . . .

I was developing a page for about 15 minutes before I realized that something didn't look right.