btc — 2011-02-07T10:28:25-05:00 — #1
YouTube provides me with this code for embedding a video:
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/AbQlt4yQeeU" frameborder="0" allowfullscreen></iframe>
I put the code in the W3 Validator and got this error: "allowFullScreen" is not a member of a group specified for any attribute
Why is this an error? I don't understand why Google would give invalid code?
rguy84 — 2011-02-07T10:40:20-05:00 — #2
It is probably YouTube-specific code. As the error says allowFullScreen isn't in the specs.
system — 2011-02-07T11:04:48-05:00 — #3
allowfullscreen is an attribute, much like title, src, but a custom one.
If xml was the subject here, then it could be possible to have custom attributes, custom elements.
In html world, this isn't possible, you have a DTD which describes elements and their attributes. The validator uses this DTD and signals when aliens are spotted.
system — 2011-02-07T12:16:17-05:00 — #4
Yeah, don't expect valid markup from Youtube -- they pretty much crap all over the specification so badly it's nothing short of a miracle their websites even work in the first place.
btc — 2011-02-07T15:58:16-05:00 — #5
lol I guess I just have to work with what they give me.
w3dx — 2011-02-08T12:52:58-05:00 — #6
The allowfullscreen custom attribute doesn't appear to make a difference (at least not at the current time)? Remove it and you still get the 'full screen' option in the player.