Valid XHTML embedded Youtube videos

A while back I posted some XHTML-validated code to embed Youtube videos. (The code that Youtube provides if you click on their “Embed” link will not validate.)

Right after I posted the immediately preceding post, which includes an embedded Youtube video, I remembered this problem and, sure enough, the embedded video did not validate. My earlier code works, but involves tweaking the CSS of this new WordPress set up.

A few seconds of internet searching turned up an alternative, which is to use one of several services that generate valid XHTML code for Youtube. For the preceding post, I used toolsfornoobs, which worked well, but required me to delete a bit of self-promoting text that the site embeds in the resulting code. Another site “<Valid XHTML Youtube>” produces simpler code, but does not provide as many options as toolsfornoobs.

Leave a Reply