HTML: The Markup Language

objectgeneric external content # T

The object element represents external content.

Permitted content #

Transparent, with the following specific structure:

zero or more param elements, followed by flow content

or

zero or more param elements, followed by phrasing content

Permitted attributes #

Descriptions for attributes specific to this element #

data = URI
The address of the content.
type = MIME type
The MIME type of the content.
height = positive integer
The height of the object, in CSS pixels.
width = positive integer
The width of the object, in CSS pixels.
usemap = hash-name reference
A hash-name reference to a map element with which to associate the object.
name = browsing-context name
A valid browsing context name.

Additional constraints and admonitions #

Tag omission #

An object element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain phrasing elements, any element that can contain flow elements

Details #

The object element represents external content, which, depending on the type of the content, will either be treated as an image, as a nested browsing context, or as external content to be processed by a plugin.

DOM interface #

interface HTMLObjectElement : HTMLElement {
           attribute DOMString data;
           attribute DOMString type;
           attribute DOMString name;
           attribute DOMString useMap;
  readonly attribute HTMLFormElement form;
           attribute DOMString width;
           attribute DOMString height;
  readonly attribute Document contentDocument;
  readonly attribute WindowProxy contentWindow;

  readonly attribute boolean willValidate;
  readonly attribute ValidityState validity;
  readonly attribute DOMString validationMessage;
  boolean checkValidity();
  void setCustomValidity(in DOMString error);
};