Is there a way to embed a YouTube video while still staying standards compliant (XHTML 1.0 Strict)?
Thanks in advance.
Video clips can be placed on a Web page as hyperlinks by using the <a> tag, or can be embedded by using the <embed> or <object> tag.
According to YouTube's Terms of Service (which applies to all users, including content providers), YouTube grants permission to access and use the site, provided that “you agree not to distribute in any medium any part of the Service or Content without YouTube's prior written permission, unless YouTube makes available ...
If you receive the error message, "Embedding disabled on request” ,you have probably accidentally disabled embedding via YouTube. To grant permission again, follow these steps: Go to “Video Manager.” Select the appropriate video and click “Edit”.
To have a video start playing from a specific point, add “? start=” to a video's embed code, followed by the time in seconds at which you'd like the video to begin playing.
Flash Satay:
http://www.alistapart.com/articles/flashsatay
There's a Tools4Noobs web page that will automatically do the conversion for you from the embed code that YouTube gives you to valid XHTML. You can choose what extra buttons appear and tweak how the border looks. It also adds a small advertising link, but that's easy to remove.
Here's an example generated by YouTube:
<object width="425" height="349">
<param name="movie" value="http://www.youtube.com/v/AWCHdhyEdCc&hl=en&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b&border=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/AWCHdhyEdCc&hl=en&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="349"></embed>
</object>
Here it is converted by Tools4Noobs:
<object type="application/x-shockwave-flash" style="width:425px; height:349px;" data="http://www.youtube.com/v/AWCHdhyEdCc?rel=0&fs=1">
<param name="movie" value="http://www.youtube.com/v/AWCHdhyEdCc?rel=0&fs=1" />
<param name="allowFullScreen" value="true" />
</object>
<div style="font-size: 0.8em"><a href="http://www.tools4noobs.com/online_tools/youtube_xhtml/">Get your own valid XHTML YouTube embed code</a></div>
Just remove the <div>
at the end to get rid of the advertising link, and you're done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With