Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

I am working on a department website that needs to be standards compliant (xhtml 1.0 transitional), but embedded flash keeps breaking the validation. We use the <embed> tag because we need to support most major browsers.

We can't use external tools, since the site is managed through a system and the admins don't like us putting extra tools (like JavaScript libraries etc) that could interfere with their template engine.

How widely supported is the object tag? Is it safe to use only the <object> tag and remove the <embed> tag all together?

like image 407
chustar Avatar asked Feb 12 '10 18:02

chustar


People also ask

What tags can I use to embed an object into an HTML code?

To include an embedded object, use the <object> tag. The HTML <object> tag is used to embed multimedia in an HTML document. The <param> tag is also used along with this tag to define various parameters.

What are embed tags in HTML?

The <embed> tag defines a container for an external resource, such as a web page, a picture, a media player, or a plug-in application.

How do you embed an object in HTML?

The <object> tag defines a container for an external resource. The external resource can be a web page, a picture, a media player, or a plug-in application. To embed a picture, it is better to use the <img> tag. To embed HTML, it is better to use the <iframe> tag.

Is embed tag deprecated in HTML5?

The embed element is now formally included in the HTML5 specification.


1 Answers

<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.

like image 118
Paul D. Waite Avatar answered Nov 14 '22 14:11

Paul D. Waite