You – invalid – XHTML – embed – tube

Youtube Embed Problem

If you’ve embedded Youtube videos via Youtube’s embed codes and just so happen you have the XHTML Compliance OCD (like me), then you would want to know you should not do


<object width="300" height="247">
<param name="movie" value="http://www.youtube.com/v/LnZQmom96jM">
</param><param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/LnZQmom96jM" type="application/x-shockwave-flash" wmode="transparent" width="300" height="247">
</embed></object>

But do


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

instead. The embed tag has been depreciated, hence using it will cause, validation shame and your friends to still treat you the same even if your entry does not validate.

4 Replies to “You – invalid – XHTML – embed – tube”

  1. Thanks – this helped me out enormously with another video hosting service.

    And I thought I was the only one with XHTML Compliance OCD!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.