Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to these two tags. I read it and conclude it with my own words; I think it will be useful to us, so I wrote this article.
This article includes two parts:
1. General introduction to the two tags.
2. Why do we use all the tags above? Is there any tag that can be left out?

1. General introduction to the two tags.
To display Flash correctly on web page, HTML tags which indicate the path of the Flash file is needed in the web page. These HTML tags are OBJECT tag and EMBED tag. OBJECT tag is used for IE on Windows, while EMBED tag is for Netscape Navigator on Windows and Macintosh and IE on Macintosh. IE on Windows play Flash with ActiveX component while other web browsers play Flash with Netscape plug-in technique. The code below is an example used to embed Flash file to web page.
Example HTML Code:

<OBJECT classid="clasid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
WIDTH="432" HEIGHT="330" id="myMovieName" >
<PARAM NAME="movie" VALUE="myMovieName.swf" />
<PARAM NAME="quality" VALUE="high" />
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="/flash/ myMovieName.swf" quality="high" bgcolor=#FFFFFF WIDTH="432" HEIGHT="330" NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>

Part 2 "Why do we use all the tags above? Is there any tag that can be left out?" will be continued soon enough:)

Source

Related articles

Dani AI

Generated

Good, practical starting point from — that classic OBJECT+EMBED wrapper was the standard cross‑browser workaround during the Flash era. is right that the old nonstandard EMBED was later standardized, but it isn’t true that OBJECT was removed from the HTML spec: both <object> and <embed> are part of the HTML living standard. Modern HTML also deprecates many plugin-specific attributes (classid, codebase, ActiveX-only params), so relying on those legacy attributes is no longer best practice. (developer.mozilla.org)

Important context for anyone reading this years later: Adobe ended support for Flash Player on December 31, 2020 and blocked Flash content from running beginning January 12, 2021 — major browsers removed plugin support, so embedding SWF/FLV with OBJECT/EMBED will usually fail in up‑to‑date browsers. That is the single main reason to stop using those tags for new work. (adobe.com)

If the goal was video (FLV), migrate to HTML5 media. Convert FLV to modern web codecs (H.264/AAC or WebM) and use the <video> element with multiple sources and a simple fallback. Example patterns to use on a page:

<video controls width="640">
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  Your browser does not support the video element.
</video>

Common FFmpeg commands (examples):

# fast container switch if codecs are compatible
ffmpeg -i input.flv -c copy output.mp4

# re-encode to H.264 + AAC
ffmpeg -i input.flv -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k output.mp4

See the HTML5 <video> reference for attributes and accessibility notes. (developer.mozilla.org)

For interactive SWF content (ActionScript): either port the experience to JS/Canvas/WebAssembly or try an emulator. The leading emulator is Ruffle (web/extension/desktop builds) — it runs many AS1/AS2 files well and its AS3 coverage is improving, but compatibility must be tested per SWF. Ruffle or archive projects are the practical preservation route; for production sites rebuild or replace Flash interactivity with standard web tech. (github.com)

Summary: OBJECT/EMBED are historically important, but Flash is EOL — convert FLV to HTML5 video or use emulators/rewrites for SWFs rather than relying on plugin embedding.

That's because OBJECT is official XHTML tag for embedding objects and old-school EMBED was used in old browsers but supported in almost all current ones too. Now EMBED is included in HTML5 specs but OBJECT tag on was excluded, so the things have changed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.