Posts in current category

HTML5 <object> tag

May 03, 2021 17:00 HTML5

Table of contents

Definitions and usages

HTML5 - the tag defines an embedded object. U se this element to add multimedia to your XHTML page. This element runs the data and parameters that you specify for objects inserted into HTML documents, as well as code that you can use to display and manipulate data.

The difference between HTML 4.01 and HTML 5

Some properties in HTML 4.01 are no longer supported.

In HTML5, objects can be submitted in the form form.

In HTML5, objects no longer appear in the element area.

Tips and comments

Note: The object element can be inside between the head element or the body element. T he text between slt;object and slt;/object is a replacement text for browsers that do not support this label. The label defines the run-time setting for the object.

Tip: For images, use the hashtag instead of the label.

Tip: At least one of the "data" and "type" properties must be defined.


Property Value Describe 4 5
  • left
  • right
  • top
  • bottom
Defines the text alignment around the object. N ot supported. Use CSS instead. 4
Archive (abandoned) Url A space separates a list of URLs that point to the archive file. T hese files contain object-related resources. Not supported. 4
Border (abandoned) pixels Defines the borders around the object. N ot supported. Use CSS instead. 4
classid class ID Used to specify the location of objects contained in the browser. Not supported. 4
codebase (abandoned) Url Define where to find the code required for the object. Not supported. 4
codetype (abandoned) MIME type The MIME type of the code referenced by the classid property. Not supported. 4
data Url Defines the URL that references object data. 4 5
Declare (abandoned)
  • true
  • false
This object can be defined only to be declared, but not created or illustrationed until it is applied. Not supported. 4
height pixels Defines the height of the object. 4 5
hspace pixels Defines the white space in the horizontal direction around the object. N ot supported. Use CSS instead. 4
name unique_name Define a unique name for the object (for use in the script). N ot supported. Use id instead. 4
standby (abandoned) text Defines the text that appears when an object is loading. Not supported. 4
type MIME_type Defines the type of MIME that specifies the data that appears in the file specified in the data property. 4 5
usemap Url Specifies the URL of the client image map that is used with the object. 4 5
vspace pixels Defines the white space in the vertical direction of the object. N ot supported. Use CSS instead. 4
width pixels Defines the width of the object. 4 5

The standard property

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

For a complete description, visit standard properties in HTML 5.

The event property

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, 
ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, 
ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, 
onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, 
onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

For a complete description, visit event properties in HTML 5.

You can embed images, audio, video, Java applets, ActiveX, PDFs, flash, and more by using the hashtag.