HTML Dog

Skip to navigation

HTML Tag: object

External resource, treated as an image, a nested browsing context, or a plugin.

Often used param children elements to send parameters to the object. Any additional content of object is treated as fallback content, that is, content that a browser will call into play if the object fails to work (if the resource, or associated plugin, isn’t found, for example).

Optional Attributes

Attribute Description Possible values
data The location of the resource to be used. URL.
type The type of the linked resource. MIME type.
typemustmatch Specifies that the object should only be used if the value of type matches the content type of the external resource. None.
name Name of the nested browsing context, if applicable. Any string with at least one character that does not start with an underscore.
usemap Image map name. Hash name (eg. #flyer) matching the name of a map element (eg. <map name="flyer">…).
form A form with which the object is associated. String matching the value of the id attribute of a form element.
width The width of the object in pixels. This can also be done, or overridden, with CSS. Number.
height The height of the object in pixels. This can also be done, or overridden, with CSS. Number.
Global attributes

Example


<object type="application/x-shockwave-flash" width="200" height="300" id="penguin">
    <param name="movie" value="flash/penguin.swf">
    <param name="quality" value="high">
    <img src="images/penguin.jpg" width="200" height="300" alt="Penguin">
</object>