How to make google video and youtube players W3C Xhtml valid

Posted On Oct 21, 2008 at 9:41 pm

You may have noticed that if you copy the flash embed code from youtube, it is not actually standards-compliant and will break your W3C validation. Here is the proper way to embed google video and youtube videos.

Youtube Player

Determine Youtube ID
<object type="application/x-shockwave-flash" style="width:425px; height:344px;" data="http://www.youtube.com/v/VIDEOID&amp;hl=en&amp;fs=1" > <param name="movie" value="http://www.youtube.com/v/VIDEOID&amp;hl=en&amp;fs=1" /> <param name="allowFullScreen" value="true"></param> </object>

Google Video Player

Determine Google Video ID
<object type="application/x-shockwave-flash" style="width:425px; height:344px;" data="http://video.google.com/googleplayer.swf?docid=DOCID" > <param name="movie" value="http://video.google.com/googleplayer.swf?docid=DOCID" /> <param name="allowFullScreen" value="true"></param> </object>

This topic has the following tags:

Last 5 Linkbacks