HTML object tag

## HTML Reference

HTML by Alphabet HTML by Function HTML Global Attributes HTML Events HTML Canvas HTML Audio/Video HTML Doctypes HTML Colornames HTML Colorpicker HTML Colormixer HTML Character Sets HTML ASCII HTML ISO-8859-1 HTML Symbols HTML URL Encode HTML Lang Codes HTTP Messages HTTP Methods Keyboard Shortcuts

## HTML Tags

<!--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <command> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <head> <header> <h1> - <h6> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <keygen> <label> <legend> <li> <link> <map> <mark> <menu> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <table> <tbody> <td> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr>

# HTML <object> Tag

« HTML Reference
<ol> Tag »

## Example

How to use the <object> element to embed a Flash file:

<object width="400" height="400" data="helloworld.swf"></object>
Try it yourself »

## Browser Support

The <object> tag is supported in all major browsers.

## Definition and Usage

The <object> tag defines an embedded object within an HTML document. Use this element to embed multimedia (like audio, video, Java applets, ActiveX, PDF, and Flash) in your web pages.

You can also use the <object> tag to embed another webpage into your HTML document.

You can use the <param> tag to pass parameters to plugins that have been embedded with the <object> tag.

## Tips and Notes

Note: An <object> element must appear inside the <body> element. The text between the <object> and </object> is an alternate text, for browsers that do not support this tag.

Tip: For images use the <img> tag instead of the <object> tag.

Tip: At least one of the "data" or "type" attribute MUST be defined.

## Differences Between HTML 4.01 and HTML5

Some HTML 4.01 attributes are not supported in HTML5.

The "form" attribute is new in HTML5.

In HTML5, objects can be used and submitted in forms.

In HTML5, objects can no longer appear inside the <head> element of a document.

## Attributes

New : New in HTML5.

Attribute | Value | Description
--- | --- | ---
align | top bottom middle left right | Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of the <object> element according to surrounding elements
archive | URL | Not supported in HTML5. A space separated list of URL's to archives. The archives contains resources relevant to the object
border | pixels | Not supported in HTML5. Deprecated in HTML 4.01. Specifies the width of the border around an <object>
classid | class_ID | Not supported in HTML5. Defines a class ID value as set in the Windows Registry or a URL
codebase | URL | Not supported in HTML5. Defines where to find the code for the object
codetype | MIME_type | Not supported in HTML5. The internet media type of the code referred to by the classid attribute
data | URL | Specifies the URL of the resource to be used by the object
declare | declare | Not supported in HTML5. Defines that the object should only be declared, not created or instantiated until needed
form New | form_id | Specifies one or more forms the object belongs to
height | pixels | Specifies the height of the object
hspace | pixels | Not supported in HTML5. Deprecated in HTML 4.01. Specifies the whitespace on left and right side of an object
name | name | Specifies a name for the object
standby | text | Not supported in HTML5. Defines a text to display while the object is loading
type | MIME_type | Specifies the MIME type of data specified in the data attribute
usemap | #mapname | Specifies the name of a client-side image map to be used with the object
vspace | pixels | Not supported in HTML5. Deprecated in HTML 4.01. Specifies the whitespace on top and bottom of an object
width | pixels | Specifies the width of the object

## Global Attributes

The <object> tag also supports the Global Attributes in HTML.

## Event Attributes

The <object> tag also supports the Event Attributes in HTML.

## Related Pages

HTML tutorial: HTML Object Element

HTML DOM reference: Object object

« HTML Reference
<ol> Tag »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE