object
<object> . . . </object>
A generic element used for embedding an external resource (such as
an image, applet, movie, or audio) on a web page. The attributes
required for the object
element vary with the type
of content it is placing. The embedded content may be treated as an
image, a nested browsing context, or may be processed by a plug-in.
The object
element may contain content that will be
rendered if the object cannot be embedded. The
object
element may also contain a number of
param
elements that pass important information to
the object when it displays or plays. Not all objects require
additional parameters. The object
and
param
elements work together to allow authors to
specify three types of information:
The implementation of the object—that is, the executable code that runs in order to render the object.
The data to be rendered. The data
attribute specifies the location of the resource, in most cases an
external file, such as a movie or a PDF.
Additional settings required by the object at runtime. Some embedded media objects require additional settings that get called into play when the object plays or is rendered.
Flow content, phrasing content, embedded content,
interactive (if it has a usemap
attribute),
palpable content, “listed, submittable, form-associated
element”
Where embedded content is expected
Zero or more param
elements, then flow
content and/or interactive content
Required/Required
HTML5 Global Attributes
data="
URI
"
Specifies the address of the resource. The syntax depends on the object.
form="
form
id
"
Not in HTML 4.01.
Associates the object
with a
form
element on the page.
height="
number
"
name="
text
"
Specifies the name of the object to be referenced by scripts on the page.
type="
media
type
"
typemustmatch
(typemustmatch="typemustmatch"
in XHTML)Not in HTML 4.01.
Indicates that the resource indicated by the
data
attribute is only to be used if the
value of the type
attribute and the content
type of the resource match.
usemap="
URL
"
width="
number
"
<object width="640
" height="360
" type="application/x-shockwave-flash" data="flash_player
.swf"> <param name="movie" value="flash_player
.swf"> <param name="flashvars" value="controlbar=over& image=poster.jpg& file=yourmovie-main.mp4
"> <img src="poster.jpg
" width="640
" height="360
" alt="" title="No video playback capabilities, please download the video below"> </object>