Saturday, March 1, 2008

Make your Flash websites XHTML compliant

Just add this:


<p>
<object type="application/x-shockwave-flash" data="/path/to/your_flash.swf" height="200" width="900">
<param name="movie" value="/path/to/your_flash.swf />
<img src="/show_this_if_visitor_cant_see_flash.jpg" width="900" height="200" alt="you need flash" />
</object>
</p>


I've been using it with:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">


NOTE that the flash object must be inside a block element <p> ;)

Hope this helps.

No comments: