Embedding Youtube

Soldato
Joined
19 Dec 2007
Posts
2,663
Location
Newton Aycliffe
There is a strange problem I have noticed with embedding Youtube videos in my website/blog.

If I do this in the valid xhtml fashion (i.e. leaving out the <embed> tag) then it works just fine in firefox or opera, however it will not show up in internet explorer.

If I then include the <embed> tag so that it will work in IE, my page no longer validates as xhtml.

Does anyone know of a method which satisfies both (i.e. works in IE but is still valid).
 
Try..

Code:
<object type="application/x-shockwave-flash" width="425" height="373" data="http://www.youtube.com/v/[COLOR="Red"]VIDEOIDHERE[/COLOR]">
<param name="movie" value="http://www.youtube.com/v/[COLOR="Red"]VIDEOIDHERE[/COLOR]&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1" /><param name="wmode" value="transparent" /></object>

Replace VIDEOIDHERE with the id of the video you want to embed and change the other settings as you see fit.
 
Back
Top Bottom