If you\'ve ever validated an otherwise XHTML 1.0 compliant website that embedded a video from YouTube, you\'ve probably seen validation errors related to YouTube\'s use of the <embed> tag, which has been deprecated in XHTML 1.0.
If you\'re looking to embed a YouTube video in your website\'s code and want to retain your validity, instead of using their suggested format:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com......."></param><embed src="http://www.youtube.com......." type="application/x-shockwave-flash" width="425" height="350"></embed></object> Use the following format:
<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com......."><param name="movie" value="http://www.youtube.com......." /></object>You\'ll notice that the new format leaves out the <embed> tag and still functions correctly when embedded in your web page.
or
<object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com......."><param name="movie" value="http://www.youtube.com......." /></object>