HTML object Tag
The information on this page is based on HTML version 4.01 (which is the current version of HTML). The next version, HTML 5, is currently being written. Here's a list of HTML 5 tags.
The HTML object tag is used for embedding an object within an HTML document. Use this tag to embed multimedia in your web pages.
You can also use the <param> tag to supply parameters to your embedded object.
| Example |
<object title="Woofer dog." classid="wooferDog.class">
<!-- If the applet didn't work, try the image file -->
<object data="wooferDog.gif" type="image/gif">
<!-- If the image didn't work, display the text -->
Woofer dog.
</object>
</object>
In this example, if the applet can't be loaded, it will attempt to load the file specified next (the image file). If that can't be loaded, it will display the text specified next. |
| Attributes: |
| Attributes specific to this tag: |
| Attribute | Description |
| classid | Specifies the location of the object either as a URI or a Windows Registry location. |
| codebase | Specifies the URI of the applet. |
| codetype | Specifies object type when the object is specified by the classid attribute. If absent, defaults to the value specified in the type attribute. |
| data | Specifies the location of data to be used by the object. |
| type | Specifies the object type as specified in the data attribute. Must be a valid MIME type. |
| archive | Space-separated list of archive URI's containing resources to be preloaded. |
| declare | Specifies to only declare the object at this stage. The object would then need to be instatiated by a separate object definition referring to this declaration. |
| standby | Specifies a message to display to the user while the object is loading. |
| Other Attributes: |
| Attribute | Description |
| class | Document wide identifier. |
| id | Document wide identifier |
| dir | Specifies the direction of the text |
| lang | Language code |
| style | Inline style (CSS). |
| title | Specifies a title to associate with the element. |
| tabindex | Helps determine the tabbing order (when the user 'tabs' through the elements on the page). |
| name | Form submission. Assigns the control name. |
| usemap | Image map. |
| width | Width to display the object. |
| height | Height to display the object. |
| border | Specifies a border for the object. |
| align | Visual alignment (i.e. bottom, middle, top, left, right). Deprecated. |
| hspace | Amount of white space to be inserted to the left and right of the object. Deprecated. |
| vspace | Amount of white space to be inserted above and below the object. Deprecated. |
| onclick | Intrinsic event (see event handlers) |
| ondbclick | Intrinsic event (see event handlers) |
| onmousedown | Intrinsic event (see event handlers) |
| onmouseup | Intrinsic event (see event handlers) |
| onmouseover | Intrinsic event (see event handlers) |
| onmousemove | Intrinsic event (see event handlers) |
| onmouseout | Intrinsic event (see event handlers) |
| onkeypress | Intrinsic event (see event handlers) |
| onkeydown | Intrinsic event (see event handlers) |
| onkeyup | Intrinsic event (see event handlers) |
|
Also see the HTML 5 version of HTML tags
Enjoy this page?
-
- Link to this page (copy/paste into your own website or blog):
- Link to Quackit using one of these banner ads.
Thanks for supporting Quackit!