HTML & CSS
Hi, i am working on a site at the moment and i need to use the <embed> tag for YouTube videos, rather than <object> or <iframe> as both <object> or <iframe> are causing conflicts with other scripts when i view my site on an iphone or ipad.
A - is the <embed> tag ok to you use
B - which is newer <embed> or <object>
Thanks in advance for your help...
Does this answer your question?
Excellent, cool, thanks... so is <embed> a new tag that is in html 5
As the reference says, it's an old, non-standard tag which has been around for some time. It has never been part of an official HTML specification, but looks set to be included in HTML5 - which has not yet been finalised.
Thanks... that's where i got confused... said it never made the standard... yet it's been included in HTML5
It only gets mentioned in 5 (descriptive rather than proscriptive) because they documented all sorts of propriety tags just because people were abusing them. Even they possibly recommend against using that element nowadays since MS now supports OBJECT, which provides fallback, a lot better that it used to do.
It's basically because HTML5 took the weird decision if more than one browser vendor supported a previously completely imaginary tag then they'd consider introducing and creating one... Hence why you get such stupidity as NOEMBED and BLINK mentioned but not LAYER. >;-)
Cool, thanks... so which out of the 3 would you use if you were given the choice:
What's the <object>ive of using <object> over <embed> (see what i done there...
As soon as i changed my videos to <embed> tag... i got a different toolbar at the top of the video, which seems a newer...
If your question meant
which out of the 3 would you use to insert a YouTube video
then the answer is, I've never had a need to do that specifically, but I would go for <object> because that's the tag I would normally choose. <embed> is non-standard before HTML5, which I'm not using, so I would avoid it.
That's just my preferred method. If <embed> is working better for you, then stick with it. As far as I know, it's well-supported, despite being non-standard.
What scripts? How does it conflict?
<iframe> is the recommended Youtube embedding code, as I understand it, as it allows them to use either Flash or <video> without you changing your code (plus it's safer since you don't give Youtube permission to run scripts in your origin).
This topic is now closed. New replies are no longer allowed.