OBJECT in Internet Explorer
As per the W3C recommendations, I have tried to change the IMG tag to the OBJECT tag. However, my image file refused to be displayed in Internet Explorer, while Opera and Mozilla have no such problems. Any solutions or is this a IE bug?
No one knows how MS has implemented Object in IE,your best bet will be to embed img tag in between the <object></object> tag that way browsers that recoginse object will display image and the ones that don't will see img tag
Why would one replace the img tag with object? I've never heard of that recommendation, where did you find this? It makes no sense semantically, and I don't see any advantages with using object to embed an image over img. Rather pointless...
-Neal, the everyman's Mod.
My Own Niche in the Web
π ~= 3.14
3*14 = 42
Coincidence? I think not.
π = The Answer to Life, the Universe, and Everything.
Khalid: I tried to embed the IMG tag, but IE treats the OBJECT tag as ActiveX. I then enabled all Activex controls without any success. Neither the embedded tag nor the alternate text was displayed.
Bob: Yes OBJECT is the future of the IMG tag. I read it in a standard HTML book. HTML Validator (software) too recommends the change to OBJECT. For more information try this link http://www.w3.org/TR/REC-html40/struct/objects.html and see section 13.1.
Well, my suggestion is to continue using the <IMG> tag, since it is not yet depreciated. If the <OBJECT> method of including an image works in browsers other than IE, that suggests to me that you have coded it correctly. We all know how IE tends to render pages in a non-standard way. Perhaps this problem will be corrected in a future release of IE; personally, I do not think that it will. (That seems to be the way of Microsoft, lol)
Can I see your code object tag as well as embedded img tag?
Originally posted by nichalp
Khalid: I tried to embed the IMG tag, .
abc is my filename (suppose). Here's the code.
<object data="images/abc.png" type="image/png" title="abc" id="abc">
<img src="images/abc.png" alt="abc" title="abc" /> Alphabets</object>
IE does not support image as an object
Your example does not work because; object is supported, but not as image so object shows nothing. The enclosed image is not shown, because an object, if supported, should not render any enclosed elements.
A "catch 22" piece of coding.
See some examples and (older)support:
It is not advisable to use object for images until IE has full support.
That's what I said!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)