SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot BTC's Avatar
    Join Date
    Jul 2010
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Errors in W3 Validator

    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?

  2. #2
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    It is probably YouTube-specific code. As the error says allowFullScreen isn't in the specs.
    Ryan B | My Blog | Twitter

  3. #3
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    SitePoint Zealot BTC's Avatar
    Join Date
    Jul 2010
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    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.
    lol I guess I just have to work with what they give me.

  6. #6
    SitePoint Member w3dx's Avatar
    Join Date
    Feb 2011
    Location
    England
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •