<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>My Beloved PHP &#187; Tutorial</title>
	<atom:link href="http://www.mybelovedphp.com/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mybelovedphp.com</link>
	<description>The Art of Quick &#38; Dirty Programming</description>
	<lastBuildDate>Sun, 06 Jun 2010 21:08:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Embedding YouTube Movies in XHTML</title>
		<link>http://www.mybelovedphp.com/2006/10/27/embedding-youtube-movies-in-xhtml/</link>
		<comments>http://www.mybelovedphp.com/2006/10/27/embedding-youtube-movies-in-xhtml/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 12:42:04 +0000</pubDate>
		<dc:creator>programmer</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.mybelovedphp.com/archives/6</guid>
		<description><![CDATA[If you try to embed a YouTube-video in a XHTML 1.0 compliant website, you will get validations errors. This is caused by YouTube&#8217;s use of the &#60;embed&#62; tag, which has been deprecated in XHTML 1.0. The standard YouTube code is: To solve the validations errors we have to get rid of the deprecated &#60;embed&#62; tag. [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" width='254' height='48' src="http://www.youtube.com/img/logo_tagline_sm.gif" alt="YouTube" /> If you try to embed a YouTube-video in a XHTML 1.0 compliant website, you will get validations errors. This is caused by YouTube&#8217;s use of the &lt;embed&gt; tag, which has been deprecated in XHTML 1.0.</p>
<p>The standard YouTube code is:</p>
<pre><code><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/ipJliqBLMRM"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/ipJliqBLMRM" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></code></pre>
<p>To solve the validations errors we have to get rid of the deprecated  &lt;embed&gt; tag. </p>
<p>Therefore we add a data attribute to the &lt;object&gt; tag. The following code is the most simple and will work in Opera and Firefox:</p>
<pre><code><object type="application/x-shockwave-flash" data="http://www.youtube.com/v/ipJliqBLMRM" width="425" height="350" /></code></pre>
<p>To get it working in MS Explorer we need to add a &lt;param&gt; tag with name and value attribute:</p>
<pre><code><object type="application/x-shockwave-flash" data="http://www.youtube.com/v/ipJliqBLMRM" width="425" height="350" ><param name="movie" value="http://www.youtube.com/v/ipJliqBLMRM"/></object></code></pre>
<p>To autoplay a movie simply add &#8220;&#038;autoplay=1&#8243; to the url:</p>
<pre><code><object type="application/x-shockwave-flash" data="http://www.youtube.com/v/ipJliqBLMRM&#038;autoplay=1" width="425" height="350" ><param name="movie" value="http://www.youtube.com/v/ipJliqBLMRM&#038;autoplay=1"/></object></code></pre>
<p>Easy isn&#8217;t it? The code in xhtml is even shorter than the standard YouTube code. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mybelovedphp.com/2006/10/27/embedding-youtube-movies-in-xhtml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
