Posts Tagged ‘HTML’

YouTube With XHTML 1.0 Strict Valid!!

Posted on November 2006 at about 2:14 PM by hwa

For those who broadcast YouTube in their blog before, you should know that the YouTube embed tag is actually not XHTML valid, it’s because the <embed> had been deprecated from XHTML 1.0.

By default the YouTube embed tag should looks something like this:

  1. <object width="425" height="350">
  2. <param name="movie" value="http://www.youtube.com/v/m_Dxp5HQNIA"></param>
  3. <param name="wmode" value="transparent"></param>
  4. <embed src="http://www.youtube.com/v/m_Dxp5HQNIA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">
  5. </embed>
  6. </object>

But it contain the <embed> HTML tag which is not allow in XHTML 1.0 Strict, so in order to make it pass the validation, i change the above code to something like this:

  1. <object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/m_Dxp5HQNIA"><param name="movie" value="http://www.youtube.com/v/m_Dxp5HQNIA" /></object>

YouTube plays well with the new tag, and it doesn’t have the <embed> tag, which is XHTML 1.0 Strict valid!