oo7ml — 2012-08-17T14:29:50-04:00 — #1
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...
technobear — 2012-08-17T14:48:19-04:00 — #2
Does this answer your question?
oo7ml — 2012-08-17T14:52:42-04:00 — #3
Excellent, cool, thanks... so is <embed> a new tag that is in html 5
technobear — 2012-08-17T15:05:58-04:00 — #4
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.
oo7ml — 2012-08-17T15:33:43-04:00 — #5
Thanks... that's where i got confused... said it never made the standard... yet it's been included in HTML5
xhtmlcoder — 2012-08-18T05:44:26-04:00 — #6
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. >;-)
oo7ml — 2012-08-18T06:33:47-04:00 — #7
Cool, thanks... so which out of the 3 would you use if you were given the choice:
technobear — 2012-08-18T08:06:23-04:00 — #8
oo7ml — 2012-08-18T08:08:19-04:00 — #9
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...
technobear — 2012-08-18T10:17:27-04:00 — #10
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.
zcorpan — 2012-08-21T08:23:42-04:00 — #11
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).