A valid technique of including flash in HTML

by Hough on April 22, 2011

These days flash animations are most used to make your site sleak and stylish. Flash action script and animation stored in .swf file format and you have to include that file in your HTML to show them on your website. Now, inserting flash inside your websites HTML can be a headache. Even most accomplished HTML coder can do mistakes in this department. One way of doing this can be directly inserting them from your Dreamweaver software. But, when you use Dreamweaver, it generates some unwanted piece of code, which may not be HTML validated. Specially <embed> element in your code to include flash animation creates W3C validation errors. <embed> tag is not supported by W3C standards. So, what is the best procedure to include falsh in your HTML code? Here is the answer.

This is pretty straightforward method to include flash in your HTML. Just replace “flashmovie.swf” by your .swf file. Give appropriate width and height and its done. Your flash animation will be added without any hassle. Also, this technique is fully W3C HTML validated and works on almost all browsers. Also, if you want to add some more parameter to your flash code you can insert them inside <param>. For example,

So, this is just great and 100% full proof technique. Use and animate your site the way you like.

Leave a Comment

Previous post:

Next post: