Thu Oct 12 00:02:38 EDT 2006

Embeding YouTube videos and staying XHTML 1.0 Compliant


I just noticed that all of these embedded videos I've been putting on my page has made me no longer XHTML 1.0 Transitional compliant. I do my best to keep with the standards so a quick Google came up with this solution. I can't take any credit for this at all. But I'm still going to post it here on my own page in the event that the original page would go down for some reason.

Basically, all you do is use the following instead of the supplied code from YouTube:

<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/7_6B6vwE83U"><param name="movie" value="http://www.youtube.com/v/7_6B6vwE83U" /></object>

Then just replace the data= parameter and the value= parameter with the URL to the video. This method also seemed to work with the one embedded thing I have in from break.com.

Hey! Look! It's a technical post for a change! ;)

Posted by Brian | Permalink | Categories: Computers and Technology | |