yawnmoth wrote:
I'm currious - how do applet, object, and embed compare to one another?
They seem to me to mostly do the same thing, so why would one chose
one over another?
EMBED has never been part of any HTML standard, so should be avoided, but
may be of some use supporting Netscape 4.x and similarly antiquated
browsers.
OBJECT is the standards-compliant version of EMBED. It also includes
support for fully-marked-up fall-back content. e.g.
<object data=MyMovie.mpeg type="video/mpeg" height=120 width=180>
<p>Except from the Quux Amateur Dramatics Society
production of <i>Macbeth</i>:</p>
<p><cite>Lady Macbeth:</citeI heard the owl scream and
the crickets cry.<br>Did not you speak?</p>
<p><cite>Macbeth:</citeWhen?</p>
<p><cite>Lady Macbeth:</citeNow.</p>
<p><cite>Macbeth:</citeAs I descended?</p>
<p><cite>Lady Macbeth:</citeAy.</p>
<p><cite>Macbeth:</citeHark!</p>
<p>(Download <a href=MyMovie.mpeg>this scene as an
MPEG video</a>.)</p>
</object>
APPLET is a more special-purpose version of OBJECT. It can only be used to
embed one particular type of object: Java applets. Everything APPLET can
do, OBJECT can do better. But again, APPLET may be better supported in a
few old browsers.
IMG is another element supposedly made obsolete by OBJECT, but most
browsers seem to have fuller for IMG than OBJECT.
It's also worth noting that there is a fifth method of embedding things:
ActiveX. This will only work in Internet Explorer, plus Netscape 7.x for
Windows. It uses a bastardised version of the OBJECT element, recognisable
by long, opaque "classid" strings.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~
http://tobyinkster.co.uk/contact