Advertisement

HTML <object> tag

Examples

Adds an object to the HTML code:

<object classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" id="Slider1" 
width="100" height="50">
  <param name="BorderStyle" value="1" />
  <param name="MousePointer" value="0" />
  <param name="Enabled" value="1" />
  <param name="Min" value="0" />
  <param name="Max" value="10" />
</object>

Try it yourself

Browser Support

IE Firefox Chrome Safari Opera

Almost all major browsers have partial support for <object> tag.

Definition and Usage

The definition of an embedded object. Use this to add multimedia elements to your XHTML pages. This element allows you to insert data and parameters specified in the HTML document object, as well as the code used to display and manipulate data.

<Object> tag is used to contain objects such as images, audio, video, Java applets, ActiveX, PDF and Flash.

The object is to replace the original intention img and applet elements. However, because of the vulnerability and lack of browser support, it did not materialize.

Browser object supports depends on the object type. Unfortunately, the major browsers use different code to load the same object type.

And fortunately, object object provides a solution. If the object element is not displayed, it will execute the code located in the <object> and </ object> between. In this way, we can nest multiple object elements (one for each browser).

Differences between HTML and XHTML

NONE

Tips and Notes:

NOTE: <param> tag define object run-time settings.

NOTE: Do not use the image <object> tag, use the <img> tag instead.

Optional attributes

Attributes value description
align
  • left
  • right
  • top
  • bottom
Text is defined around the object alignment.
archive URL URL list separated by spaces point to the archive file. These archives contain the resources associated with the object.
border pixels Defined border around the object.
classid class ID ID embedded value is defined in the Windows Registry or a URL in the class, this property allows you to specify the Object Browser included location, usually a Java class.
codebase URL Where can I find the object is defined in the code required to provide a reference URL.
codetype MIME type MIME type referenced by classid attribute code.
data URL Define a reference URL object data. If there are data files that need the object of processing, use data attribute to specify these data files.
declare declare This object can be defined only be declared, but can not be created or illustration until the object has been applied so far.
form form_id One or more form specified object belongs.
height pixels Defines the height of the object.
hspace pixels Blank definition objects around the horizontal direction.
name unique_name Define a unique name (for use in scripts) for the object.
standby text When you define the text when the object being loaded is displayed.
type MIME_type Definition is specified MIME type specified in the data file attributes appear in the data.
usemap URL Client-side image map URL provisions used in conjunction with the object.
vspace pixels Blank vertical definition of the object.
width pixels Define the width of the object.

Global Properties

<object> tag supports HTML in the global properties .

Event Properties

<object> tag supports HTML in the event properties .

Related Pages

HTML DOM Reference Manual: Object Object