Archive for the ‘Tutorials’ Category

Embed (X)HTML Valid Video’s

Saturday, March 15th, 2008

I’ve always been a sucker for valid markup code. I personally cannot stand the sight of that little red bar when heading on over to W3C’s Validator. So heres a little tip for you all on embedding valid (X)HTML videos in your blog (or webpage).

There are a couple key things to take note of. Normally, the code you use to embed videos, like that of a Youtube video, makes use of the embed tag. This tag, among other elements, was never part of any standardized versions of HTML. And so, using the embed tag produces invalid markup. There are a lot of other elements which would produce invalid markup, such as the classid or the codebase attribute.

You’re probably thinking, thats all fine and whatnot, but just tell me how to do it already! So here you go, just copy this bit of code replacing the appropriate values.

Embed (X)XHTML Valid Videos
  1. <object type="application/x-shockwave-flash" data="path/file.swf" width="XXX" height="XXX">
  2.      <param name="movie" value="path/file.swf" />
  3.      <param name="quality" value="high" />
  4. </object>