Embedding YouTube Movies in XHTML
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’s use of the <embed> 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 <embed> tag.
Therefore we add a data attribute to the <object> tag. The following code is the most simple and will work in Opera and Firefox:
To get it working in MS Explorer we need to add a <param> tag with name and value attribute:
To autoplay a movie simply add “&autoplay=1″ to the url:
Easy isn’t it? The code in xhtml is even shorter than the standard YouTube code.
March 25th, 2010 at 4:06 pm
I really like youtube but it does have some bad things on it. Like with illegal material and things.
August 30th, 2010 at 10:39 pm
Sick and tired of getting low amounts of useless traffic for your site? Well i want to tell you about a brand new underground tactic which makes me personally $900 daily on 100% AUTOPILOT. I really could be here all day and going into detail but why dont you just check their site out? There is a great video that explains everything. So if your serious about producing effortless hard cash this is the site for you. Auto Traffic Avalanche
August 30th, 2010 at 11:09 pm
Tired of getting low numbers of useless traffic for your site? Well i want to share with you a new underground tactic which makes myself $900 per day on 100% AUTOPILOT. I possibly could be here all day and going into detail but why dont you just check their website out? There is a excellent video that explains everything. So if your seriously interested in producing hassle-free money this is the site for you. Auto Traffic Avalanche