Valid XHTML and YouTube embedding

If you look at the sidebar of this web page, you might see that "Valid XHTML" link. It's a link that WordPress adds per default and that you have probably seen on a gazillion of other blogs as well.

Have you clicked on it? No one does, because why should you care if my Page is valid XHTML if it displays correctly for you? Anyway, I clicked it a few minutes ago, and was greeted with a nice "This page is not valid XHTML!". Whoops. I tried clicking that link on a few other blogs, and many of them are not valid XHTML anymore, due to some funky stuff in the postings.

I think it's quite embarrassing, having that "Look ma! Valid XHTML!" statement on your web site, and then not fulfilling it. Here, there are two solutions: Simply removing the link that no one cares about anyway, or actually fixing the broken XHTML.

I went with the second option, and I found that the little YouTube video i've embedded a few weeks ago is breaking my XHTML, because the default YouTube embed code is not XHTML compliant. I found that this is one of the more common sources of those false valid XHTML statements. Luckily, there are people who found a proper way to make XHTML compliant YouTube embedding, which you can find here. I went back and fixed the article, so now the valid XHTML link leads to a nice "This Page Is Valid XHTML 1.0 Transitional!" message. Woohoo!

Comments (1)

MikeFitzMarch 20th, 2008 at 08:04

Thanks for the reference. -- Cheers -- Mike