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:
- In Spanish, YouTube, WordPress 2 y Xhtml
- In German, YouTube XHTML
- Bernie Zimmermann, Embedding YouTube Videos as Valid XHTML 1.0
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.
- LCD Projector for Interactive Learning
- LCD Projector for Visual Learners of History+English
- And That's A Wrap!
3 Comments
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.
They are owned by Google. Need I say more?
We could turn this on for all our Youtube (and possibly other embeds) with a deploy, I think it’d be a worthwhile project.