HTML 5 <object> Tag
Example
How to use the object element to display Flash:
| <object data="helloworld.swf" /> |
Try it yourself »
|
Definition and Usage
The <object> tag is used to include objects such as images, audio, videos,
Java applets, ActiveX, PDF, and Flash.
The object element allows you to specify the data and parameters for
objects inserted into HTML documents, and the code that can be used to
display/manipulate that data.
Differences Between HTML 4.01 and HTML 5
Some HTML 4.01 attributes are not supported in HTML 5.
The "form" attribute is new in HTML 5.
Objects can be used and submitted in forms.
Tips and Notes
Note: An object element can appear inside the head or the body
element. The text between the <object> and </object> is the
alternate text, for browsers that do not support this tag. The <param>
tags define run-time settings for the object.
Tip: For images use the <img> tag instead of the <object>
tag.
Tip: At least one of the "data" and "type" attributes MUST be defined.
Attributes
| Attribute |
Value |
Description |
| data |
URL |
Defines a URL that refers to the object's data |
| form |
formname |
Defines one ore more forms the object belongs to. |
| height |
pixels |
Defines the height of the object |
| name |
unique_name |
Defines a unique name for the object (to use when a form is
submitted). |
| type |
MIME_type |
Defines the MIME type of data specified in the data attribute |
| usemap |
URL |
Specifies a URL of a client-side image map to be used with the object |
| width |
pixels |
Defines the width of the object |
Standard Attributes
| class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title |
For a full description, go to Standard Attributes in HTML 5.
Event Attributes
| onabort, onbeforeunload, onblur, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress,
onkeyup, onload, onmessage, onmousedown, onmousemove,
onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect,
onsubmit, onunload |
For a full description, go to Event Attributes in HTML 5.

Need an easy way to get data into XML, or transform XML to another format?
MapForce lets you map XML data to/from any combination of XML, database, flat file,
Excel 2007, XBRL, or Web services data. Then it transforms data instantly or
auto-generates royalty-free code for recurrent conversions.
New features in Version 2010!
- Easy-to-use, graphical data mapping interface
- Instant data transformation
- XSLT 1.0/2.0 and XQuery code generation
- Java, C#, and C++ code generation
- Advanced data processing functions
- Support for all major relational databases including SQL Server, IBM DB2, Oracle, and more
- Visual Studio & Eclipse integration
- Available in 32-bit and 64-bit versions
Download a fully-functional trial today!
|
|
|
|