Copyright ©

HTML <object> tag



The HTML <object> tag is used to embed multimedia in an HTML document. The <param> tag is also used along with this tag to define various parameters.

Difference between HTML and XHTML:



<object title="Test Object." classid="java.class">
  <param name="audio" value="music.wav" />
  <param name="width" value="600" />
  <param name="height" value="400" />

Further detail on <object> tag can be found in Embed Multimedia Chapter.


Defines visual alignment of the object
archiveURLA space separated list of URL's to archives.
borderpixelsSpecifies border width around the object
classidClass IDDefines a class ID value as set in the Windows Registry or a URL.
codebaseURLSpecifies tha path where object code is located.
codetypemime typeThe internet media type of the code referred to by the classid attribute.
dataURLSpecifies the URL for Object data.
declaredeclareDefines that the object should only be declared, not created or instantiated until needed.
heightpixelsSpecifies the hight of the object.
hspacepixelsSpecifies the horizontal space around the object.
nameobject nameSpecifies a unique name for the object
standbytextDefines a text to display while the object is loading.
typemime typeDefines the MIME type of data specified in the data attribute.
usemapURLSpecifies a URL of a client-side image map to be used with the object
vspacepixelsSpecifies the vertical space around the object.
widthpixelsSpecifies the width of the object.

Standard Attributes:

classDocument wide identifier
dirSpecifies the direction of the text
idDocument wide identifier
titleSpecifies a title to associate with the element.
styleHelps to include inline casecadubf style sheet.
langSets the language code.
xml:langSets the language code.
tabindexHelps determine the tabbing order
accesskeyAccess keys (or shortcut keys)

Event Attributes:

onclickScript runs when a mouse click
ondblclickScript runs when a mouse double-click
onmousedownScript runs when mouse button is pressed
onmouseupScript runs when mouse button is released
onmouseoverScript runs when mouse pointer moves over an element
onmousemoveScript runs when mouse pointer moves
onmouseoutScript runs when mouse pointer moves out of an element
onkeypressScript runs when key is pressed and released
onkeydownScript runs when key is pressed
onkeyupScript runs when key is released

Copyright ©