html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <object> tag

Definition

The <object> tag is used to define an embedded object in our HTML.

Example


<object data="http://htmldoctor.info/pages/apple.html" 
  type="text/html" 
  width="300" 
  height="200"
  alt : <a href="http://htmldoctor.info/pages/apple.html">View Apple</a>
</object>

Required Attributes

NONE

Optional Attributes

align - this attribute is deprecated, use CSS instead.

border - this attribute is deprecated, use CSS instead.

hspace - this attribute is deprecated, use CSS instead.

vspace - this attribute is deprecated, use CSS instead.

archive specifies a space delimited list of URLs that are relevant to the object.


<object data="http://htmldoctor.info/pages/apple.html" 
        archive="aURL orURLs"
</object>

classid specifies a URL or Windows registry location for the object.


<object data="http://htmldoctor.info/pages/apple.html" 
        classid="aURL orWindowsRegisrty">
</object>

codebase specifies a base URL location for the archive, classid and data attributes.


<object data="pages/apple.html" 
        codebase="http://htmldoctor.info/">
</object>

codetype specifies the content type of the data defined in the classid attribute.


<object data="pages/apple.html" 
        classid="aURL orWindowsRegisrty"
        codetype="application/excel">
</object>

data specifies the URL location of the objects' data.


<object data="pages/apple.html"> 
</object>

declare specifies that the object is declared and not instantiated.


<object data="pages/apple.html" 
        declare="declare">
</object>

height specifies the height of the object in pixels.


<object data="pages/apple.html" 
        height="300">
</object>

name specifies a name for the object.


<object data="pages/apple.html" 
        name="someName">
</object>

standby specifies text to display while the object is loading.


<object data="pages/apple.html" 
        standby="Loading the apple object">
</object>

type specifies the content type of the data in the data attribute.


<object data="pages/apple.html" 
        type="application/pdf">
</object>

width specifies the width of the object in pixels.


<object data="pages/apple.html" 
        width="500">
</object>

usemap specifies a client side map image to be used with the object.


<object data="pages/apple.html" 
        usemap="#mapName">
</object>

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<object class="classname"></object>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<object id="idname"></object>

style - specifies an inline style for the element allowing you to apply the style to the content.


<object style="color:red;text-align:left"></object>

tabindex - specifies the tab index of the object.


<object tabindex="2"></object>

title - specifies extra information about the content.


<object title="information about the content"></object>

Language Attributes

dir - specifies the directional flow of the content.


<!-- The text will flow from left to right -->
<object dir="ltr"></object>

<!-- The text will flow from right to left -->
<object dir="rtl"></object>

lang - specifies a language code for the content of the element.


<object lang="en"></object>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<object xml:lang="fr"></object>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<!-- Executes the go() function -->
<object onkeydown="go()"></object>

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<!-- Executes the go() function -->
<object onkeypress="go()"></object>

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<!-- Executes the go() function -->
<object onkeyup="go()"></object>

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<!-- Executes the go() function -->
<object onclick="go()"></object>

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<!-- Executes the go() function -->
<object ondblclick="go()"></object>

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<!-- Executes the go() function -->
<object onmousedown="go()"></object>

onmousemove - The JavaScript code to be run when the mouse button is moved.


<!-- Executes the go() function -->
<object onmousemove="go()"></object>

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<!-- Executes the go() function -->
<object onmouseout="go()"></object>

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<!-- Executes the go() function -->
<object onmouseover="go()"></object>

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<!-- Executes the go() function -->
<object onmouseup="go()"></object>


<noscript> tag    << Prev          Next >>   <ol> tag

go to home page Homepage go to top of page Top

HTML Elements

The complete set of HTML elements also known as HTML tags from the latest HTML 4.01 Specification.

Click the links for more information on individual tags and their attributes.

<!--...-->

<!DOCTYPE>

<a>

<abbr>

<acronym>

<address>

<applet>

<area />

<b>

<base />

<basefont />

<bdo>

<big>

<blockquote>

<body>

<br />

<button>

<caption>

<center>

<cite>

<code>

<col />

<colgroup>

<dd>

<del>

<dfn>

<dir>

<div>

<dl>

<dt>

<em>

<fieldset>

<font>

<form>

<frame />

<frameset>

<h1> - <h6>

<head>

<hr />

<html>

<i>

<iframe>

<img />

<input />

<ins>

<isindex />

<kbd>

<label>

<legend>

<li>

<link />

<map>

<menu>

<meta />

<noframes>

<noscript>

<object>

<ol>

<optgroup>

<option>

<p>

<param />

<pre>

<q>

<s>

<samp>

<script>

<select>

<small>

<span>

<strike>

<strong>

<style>

<sub>

<sup>

<table>

<tbody>

<td>

<textarea>

<tfoot>

<th>

<thead>

<title>

<tr>

<tt>

<u>

<ul>

<var>