So I took the plunge today and got my website to pass CSS and XHTML validation tests. This ensures that my site renders correctly in most browsers and on mobile devices. Check out UITest.com for links to several validation tools.
The hardest thing to get validated are embedded YouTube videos. The <embed> tag they use is depreciated in XHTML 1.0. As soon as you embed a video, your site will fail validation. I found several code samples for fixing this, but only one of them actually worked. I just had to tweak the size so the output matched that from the YouTube script.
Here’s the HTML:
<object type=”application/x-shockwave-flash” data=”http://www.youtube.com/v/sM_WEohK3bo&hl=en” width=”425″ height=”355″>
<param name=”movie” value=”http://www.youtube.com/v/sM_WEohK3bo&hl=en” />
<param name=”FlashVars” value=”playerMode=embedded” />
<param name=”wmode” value=”transparent” />
</object>
The original script came from HERE.
The only problem I’ve had is with the visual editor in WordPress auto-replacing this code with the original YouTube code.


Nice information, I really appreciate the way you presented.Thanks for sharing..
Reply