YouTube Embed Not In Bed With Web Standards

I’ve long known that YouTube embeds aren’t XHMTL because, ironically, embed isn’t valid XHTML. I knew there must be an easy solution, object, but I never made the time to figure it out.

Today I was helping work through some of the WordPress.com support requests, and a customer asked about this very issue.

I’ve never heard described a real problem — that it doesn’t pass W3C Markup Validator I don’t see as a problem in itself. I would love for a real problem to lend weight to the argument of YouTube addressing this, though allowing browsers to run lean, mean, and fast is itself a pretty good reason.

So I did some research. It seems that a solution is both reasonable and well known:

    Specifically about YouTube:

    Is there good reason YouTube hasn’t done this?

    YouTube Help turns up nothing.

    Aidas Bendoraitis asked this question on YouTube API Developer Forum, but his question has gone unanswered.

    I don’t think I have any contacts on Google’s YouTube team, so I will put this out there for now, and wait for an opportunity to pursue this further.

    This entry was posted in Web and tagged , , , , , , , , . Bookmark the permalink.

    3 Responses to YouTube Embed Not In Bed With Web Standards

    1. You can write a JavaScript function that would generate YouTube’s code and place it into an empty div object using innerHTML. There are plenty pre-built JavaScript flash loaders available for free; however you will need to make a slight modification to fit your scenario.

    2. Bryan Clark says:

      They are owned by Google. Need I say more?

    3. Matt says:

      We could turn this on for all our Youtube (and possibly other embeds) with a deploy, I think it’d be a worthwhile project.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>