W3C Validate your youtube embed code
March 16, 2010 Leave a comment
Her’s the thing if you take embed code from a youtube chanel and paste it on your webpage you get loads of validation errors. Try to validate a youtube page (c;
So how do you fix this ,.. here’s an eksample of such embed code
<object width="{$width}" height="{$height}"> <param name="movie" value="{$playUrl}"/> <param name="allowFullScreen" value="true"/> <param name="allowscriptaccess" value="always"/> <embed src="{$playUrl}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="{$width}" height="{$height}"/> </object>
this will fail validation bigtime,.. to remedy this get rid of the embed tag, which is leftover from the good netscape days. Like this
<object type="application/x-shockwave-flash" style="width: {$width}px; height: {$height}px" data="{$playUrl}"> <param name="movie" value="{$playUrl}" /> </object>