HTML CSS Bootstrap Javascript Icons Python
HTML References
HTML - Tag Reference HTML - Tag by Category HTML - Attributes HTML - Global Attributes HTML - Events HTML - Language Codes HTML - Country Codes HTML - URL Encoding HTTP Methods HTTP Status Codes <input> types
All 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> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <h1> - <h6> <head> <header> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <label> <legend> <li> <link> <main> <map> <mark> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <picture> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <svg> <table> <tbody> <td> <template> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr>

HTML <object> tag

The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context.

Use this element to embed multimedia (like audio, Applets, ActiveX, PDF, and Flash) in your web pages.

You can also use this element to embed another webpage into your HTML document.

Run code

Browser compatibility

The <object> element is fully supported by all browsers:

Element
<object> yes yes yes yes yes



Attributes

The following table shows the attributes that are specific to the <object> tag:

Attribute Value Description
align top
bottom
middle
left
right
Not supported in HTML5.
Specifies the alignment of the object element
archive URL Not supported in HTML5.
A space separated list of URL's to archives
border pixels Not supported in HTML5.
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 media_type Not supported in HTML5.
The 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
height pixels Specifies the height of the object
hspace pixels Not supported in HTML5.
Specifies the horizontal space around the 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 media 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.
Specifies the vertical space around the object
width pixels Specifies the width of the object

Global Attributes

The <object> tag supports the global attributes described in HTML Global Attributes Reference

Event Attributes

The <object> tag supports the event attributes described in HTML Events Reference


More Examples

You can also use <object> element to embed another webpage into your HTML document:

Run code

You can also use <object> element to embed an image into your HTML document:

Run code

Last updated: Wednesday 26 Sep, 2018