/

HTML / CSS / JavaScript Tutorial

HTML Element: <object>

[this page | pdf | back links]

The HTML <object> element indicates an embedded object, such as a Java applet, ActiveX or Flash plugin. It can also be used to embed another webpage into the HTML document. <param> elements can be used to pass parameters to plugins embedded within <object> elements.

 

<object> elements must appear inside the <body> element of the webpage. Text between the opening <object> and the closing </object> tags is interpreted as alternative text that is displayed for browsers that do not support the <object> element. At least one of element’s data or type attributes needs to be defined.

 

The attributes it can take (other than HTML global attributes and HTML event attributes) include:

 

Attribute

Description

More

data

URL of resource to be used by object

Here

form

Name of the form that element belongs to

Here

height

Height of element

Here

name

Name of element

Here

type

Type of element

Here

usemap

Specifies an image as a client-side image-map

Here

width

Width of element

Here

 

It used to support the align, archive, border, classid, codebase, codetype, declare, hspace, standby and vspace attributes, but these are no longer supported by HTML 5.

 

To create or access such an element in JavaScript see here. The corresponding HTML DOM object supports standard DOM properties and methods, and additional properties with the same name and meaning as the attributes of the underlying HTML element referred to above (with the usemap property of the underlying element corresponding to the useMap property of the DOM object).

 

The default style applicable to this element is shown here.

 


NAVIGATION LINKS
Contents | Prev | Next | HTML Elements


Desktop view | Switch to Mobile