Which browsers support the <embed> and <object> tags?

爱⌒轻易说出口 提交于 2019-11-30 17:09:14

<embed> is invalid in XHTML 1.0 and HTML 4, but it’s valid in HTML5, so you could switch to the HTML5 doctype and be compliant with that standard instead.

As mentioned above, the Flash Satay article at A List Apart is a great explanation of how to get Flash working with just an <object> tag. It’s not so much which browsers support <object> (I think only Netscape 4 doesn’t), it’s more that the differences in how the browsers support Flash embedded with <object> screw everything up.

Definitely read the article. It’s got code you can use and everything. In short, <object> on its own works fine, unless you want a Flash movie to start playing before it’s fully downloaded. Then you need another Flash movie to act as a wrapper.

It's best if you use http://code.google.com/p/swfobject/ which deals with browser compatibility issues.

Google suggests using swfobject as well.

Austin Fitzpatrick

This validator: http://validifier.com/ does a pretty good job, and I've had decent results with it. (Edit note: site is now "adult" & presumably NSFW.)

There's also this article: http://www.alistapart.com/articles/flashsatay/ on how to embed without an embed tag, but I believe it involves using a container movie, which isn't much fun but does get the job done.

The <embed> tag is not a valid tag. The <object> tag is. Cherouvim is correct in that swfobject will take care of all of that for you. I highly recommend it.

The <object> tag helps for the browser who use ActiveX controls to display properly the flash movie and it is mainly used for IE . With newest IE 7 and 8 the flash movie works without the <object> tag and <embed> tag is for Netscape and related to it browsers using Netscape plugin to display a flash movie.

So it better to use both to be safe that your flash movie will have a good chance to be played on all the browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!