HTML 5: The Markup Language (ARIA Edition)

objectgeneric external content # T

The object element represents external content.

Permitted contents #

Transparent, with the following specific structure:

zero or more param elements, followed by flow content


zero or more param elements, followed by phrasing content

Permitted attributes #

global attributes
Any attributes permitted globally.
data = non-empty URL potentially surrounded by spaces #
The address of the content.
type = MIME type #
The MIME type of the content.
A string that identifies a valid MIME media type as defined in [RFC 2046].
height = non-negative integer #
The height of the object, in CSS pixels.
width = non-negative 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.
Any string, with the following restrictions:
  • must not start with a "_" character
  • must be at least one character long
form = ID reference NEW #
The value of the id attribute on the form with which to associate the element.
aria = #
(detailed attribute description to come)

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 boolean typeMustMatch;
           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(DOMString error);

  legacycaller any (any... arguments);

Typical default display properties #

object:focus {
outline: none; }