XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / object
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
object
HTML 4.01 | HTML 5 |
<object> ... </object>
A generic element for embedding media files, such as images, applets, movies, audio or other HTML files, in a web page. The attributes required by object depend on the type of embedded content. The object element can contain alternative content displayed if the object cannot be embedded. In addition, object can contain a series of param elements that pass important information to the object when it is displayed or played. Not all objects need additional parameters. The elements object and param work together to let authors specify three kinds of information:
The object’s implementation: the executable code, such as a plugin, needed to display it.
The data to display. The attribute
dataspecifies the resource’s location, usually an external file such as a movie or PDF.Additional settings needed at runtime. Some embedded media files need further settings retrieved when the object is played or displayed.
Notes
The object element began as a proprietary Internet Explorer element supporting ActiveX and later Java applets. Browser support for object falls short of the W3C’s expectations for a general-purpose object player. For example, images cannot currently be placed reliably in object elements.
Start/end tag
Required/required
Attributes
Core, internationalization, events, global HTML 5 attributes
align="bottom|middle|top|left|right"Deprecated. Not in HTML 5. Aligns the object with surrounding text. For an explanation of the values of
alignsee the entry for the elementimg.archive="URLs"Not available in HTML 5. Contains a space-separated list of URLs of resources used by the object.
border="Zahl"Deprecated. Not in HTML 5. If the object is marked as a link,
borderdefines the displayed border’s width in pixels.classid="URI"Not available in HTML 5. Specifies the location of the object’s implementation. Used with or instead of the
dataattribute. Syntax depends on the object type. Not supported by Gecko-based browsers such as Firefox or Seamonkey.codebase="URI"Not available in HTML 5. Defines a URL for resolving relative URLs in the document (similarly to the element
base). By default, the value ofcodebasematches the current document’s base URL.codetype="Inhaltstype"Not available in HTML 5. Specifies the code’s media type. This is needed if the browser cannot determine the MIME type of an applet from the attribute
classidor if the server supplied an incorrect MIME type when downloading the object.data="URI"Contains the resource’s address. Syntax depends on the object.
declare(declare="declare"in XHTML)Not available in HTML 5. Declares an object while preventing browsers from downloading and processing it. Used with the attribute
name. It works like a forward declaration in a programming language, deferring download until the object is actually used.form="Formular-ID"HTML 5 only. Associates an
objectelement with aformelement in the same document.height="Zahl"The object’s height in pixels.
hspace="Zahl"Deprecated. Not in HTML 5. The width of the space to the object’s left and right, in pixels.
name="Text"Defines the object’s name so scripts on the page can access it.
standby="Nachricht"Not available in HTML 5. Contains a message displayed while the object loads.
tabindex="Zahl"Defines the element’s position in the document’s tab order. The value must be between 0 and 32,767. It allows users to move between page elements with the Tab key.
type="Medientyp"Specifies the resource’s media type.
usemap="URL"Specifies the image map to use with the object.
vspace="Zahl"Deprecated. Not in HTML 5. The height of the space above and below the object, in pixels.
width="Zahl"The object’s width in pixels.
Example
<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="280" width="320" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,7,111">
<param name="URL" value="movies/europe.wmv">
<param name="autoStart" value="false">
<param name="UIMode" value="full">Der Windows Media Player ist nicht installiert. Hier herunterladen.
</object>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de