Valid W3C XHTML Embed Code for Hulu

After embedding the previous Conan O’Brien clip from Hulu, I noticed that the Hulu embed code broke my site’s W3C XHTML validation. This is because the embed tags that Hulu uses aren’t part of the XHTML 1.0 standard.

Anyway, I figured it out. Here’s the valid embed code for the Conan clip:

<object type="application/x-shockwave-flash" style="width:512px; height:350px;" data="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA"><param name="movie" value="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA"></param><param name="allowFullScreen" value="true"></param></object

and here’s the default, non-valid Hulu embed code:

<object width="512" height="296"><param name="movie" value="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA" type="application/x-shockwave-flash" allowFullScreen="true"  width="512" height="296"></embed></object

Adapted from Bernie Zimmerman‘s article.


Posted on Jun 05, 2009 - 09:36 AM

Comments:

thanks for this blog

By Chat on Nov 11, 2010 - 06:51 AM


Leave A Comment!!

Please enter the letters or word you see in the image below:

Name:

Email:

Location:

URL:

Remember this information for next time

E-mail me about follow-up comments