<object>
TagThe object tag is designed to replace the <applet>
, <embed>
,
and <img>
tags, and to provide nested alternative content, should the browser
not be able to render the intended object insertion.
Unfortunately, no current browser correctly implements all aspects of this tag. The examples below will allow you to see if your browser is following all the rules.
The <img>
tag is still used for images, although it is not as useful as the
<object>
tag, which offers alternate content through the nesting of tags,
a few other helpful features. Try out these tests to find out if your browser supports all types of
images properly.
The HTML 4.01 specification states that the object tag can have multiple
other tags or content nested inside it, including other <object>
tags,
and that only the first container which can be rendered (checking from the outside in)
should be displayed. Unfortunately, Internet Explorer renders all <object>
tags, instead of just the first one that works.
HTML and XHTML Strict disallow the use of frames, which unfortunately includes the
<iframe>
“inline frame” tag, which can be used to embed other HTML files.
The <object>
tag can be used as its replacement, but not all browsers
implement it properly. This page will show if your browser does.
Most authors use the <applet>
tag to embed Java applets in
their pages, but this tag no longer exists in the HTML 4.01 Strict and XHTML 1.0/1.1 Strict
specifications. Fear not, for the <object>
tag can handle this as well.