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.

    Comments (3)

    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.

      Wednesday, January 16, 2008 at 1:48 pm #
    2. Bryan Clark wrote::

      They are owned by Google. Need I say more?

      Wednesday, January 16, 2008 at 2:46 pm #
    3. Matt wrote::

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

      Saturday, January 19, 2008 at 2:08 pm #