HTML 5 <object> Tag
Example
How to use the object element to display Flash:
<object data="helloworld.swf" /> |
View it » |
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
New : New in HTML 5.
Attribute |
Value |
Description |
align |
left
right
top
bottom |
Not supported in HTML 5. |
archive |
URL |
Not supported in HTML 5. |
border |
pixels |
Not supported in HTML 5. |
classid |
class_ID |
Not supported in HTML 5. |
codebase |
URL |
Not supported in HTML 5. |
codetype |
MIME_type |
Not supported in HTML 5. |
data |
URL |
Defines a URL that refers to the object's data |
declare |
declare |
Not supported in HTML 5. |
formNew |
formname |
Defines one ore more forms the object belongs to. |
height |
pixels |
Defines the height of the object |
hspace |
pixels |
Not supported in HTML 5. |
name |
unique_name |
Defines a unique name for the object (to use when a form is
submitted). |
standby |
text |
Not supported in HTML 5. |
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 |
vspace |
pixels |
Not supported in HTML 5. |
width |
pixels |
Defines the width of the object |
Standard Attributes
The <a> tag also supports the Standard Attributes in HTML 5.
Event Attributes
The <a> tag also supports the Event Attributes
in HTML 5.
|