View Full Version : YouTube uses <EMBED> inside of <OBJECT> for their embeddable snippet. Why?

01-28-2008, 02:35 PM
Hey all,

Check out this page, then the upper-right box with the embeddable snippet: http://www.youtube.com/watch?v=fo_QVq2lGMs

Notice how YouTube has the <EMBED> placed inside the <OBJECT>? Why did they do that? Is it more beneficial?


<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/fo_QVq2lGMs&rel=1"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/fo_QVq2lGMs&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>

Right now on my site, I just have the <EMBED> for the snippet. Example can be seen here: http://www.comicwonder.com/joke/b6681360b

Any guidance or advice is greatly appreciated!

01-28-2008, 02:42 PM
Howdy and Welcome... :)

I don't really understand what your question is, but OBJECT tag is used for the IE browser to render the ActiveX content, and FireFox uses the data inside the EMBED tag to do the same thing...

and that EMBED inside the OBJECT tag is pretty much standard HTML way...

As for the comicwonder site, you are using SWFObject to embed the Flash movie which automatically takes care of embedding the SWF content...

01-28-2008, 02:45 PM
Hey CyanBlue!

Hmm, well my main question was the snippet that sites provide to others to embed their player, or widget, on other sites. YouTube has theres on the right at the top next to the player. Ours is mid-page. Right now, we are just providing the <embed> snippet, and I was checking why YouTube would put the <embed> inside the <object>.

So is your suggestion to do it like YouTube's?

01-28-2008, 03:50 PM
Yup... That pretty much is the HTML standard...

02-04-2008, 10:25 PM
without it I believe you will still have to click to activate the swf in IE