4

I'd like to embed an SWF file in HTML5. It works fine with this code:

<embed src="main.swf" width="550" height="400" />

But how could I show alternative content (an animated GIF image, or a static JPEG or PNG) just in cases which swf file is not supported (and still validating in w3! ;) )

Thank you!

1
  • Use an <object> tag instead. Commented Aug 25, 2014 at 15:59

1 Answer 1

6

Use the object tag instead of the embed tag like so: <object width="550" height="400" data="main.swf">Alertnative Content Here</object>

See: EMBED vs. OBJECT

Sign up to request clarification or add additional context in comments.

1 Comment

Thank YOU!!! It worked perfectly. I've just had to use <param name=FlashVars value="" /> for pass the flashvars values and use data instead of src. It works perfectly! THANK YOU!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.