Posted: March 20, 2008
You have just about completed your latest website by dropping in an embedded Flash movie or YouTube video and now you are ready to move it live. As a final test, you run your site through the W3C Markup Validation Service only to learn that there are a whole bunch of errors with your XHTML.
XHTML produced by the Flash software or YouTube is not valid XHTML markup and therefore needs to be modified if you want the W3C Validator’s seal of approval.
To start, remove the <embed> tag from your code as it is not a valid tag for standard XHTML. Then, add the following parameters to the object tag:
type=”application/x-shockwave-flash”
data=”your-flash-file.swf”
This should do the trick and now your page, assuming all other code is correct, should validate successfully. A couple of more in depth articles on this topic is ALA’s Flash Satay and Bernie Zimmermann’s post about YouTube videos.
Leave a Reply