YouTube With XHTML 1.0 Strict Valid!!
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:
- <object width="425" height="350">
- <param name="movie" value="http://www.youtube.com/v/m_Dxp5HQNIA"></param>
- <param name="wmode" value="transparent"></param>
- <embed src="http://www.youtube.com/v/m_Dxp5HQNIA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">
- </embed>
- </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:
- <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!