English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referencia HTML

Comprehensive lista de etiquetas HTML

HTML: <object> etiqueta

HTML: <object> etiqueta se utiliza como contenedor para insertar recursos externos en un documento HTML, como audio, video, Flash, PDF, aplicaciones externas o complementos del navegador. Debido a problemas de compatibilidad, la etiqueta <object> se utiliza más a menudo que la etiqueta <embed> para insertar recursos. Este etiqueta también se conoce comúnmente como elemento <object>.

Ejemplo en línea

Añadir Flash a HTML usando el elemento <object>:

!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Base Tutorial Site(oldtoolbag.com)</title> 
</head>
<body>
<object type="application/x-shockwave-flash" src="bookmark.swf" width="400" height="300"></object>
</body>
</html>
Prueba y mira ‹/›

Compatibilidad del navegador

IEFirefoxOperaOperaChrome

Safari

Currently, most browsers support the <object> tag.

Tag definition and usage instructions

Define an embedded object. Use this element to add multimedia to your XHTML page. This element allows you to specify the data and parameters of the object to be inserted in the HTML document, as well as the code that can be used to display and operate the data.

<object> tag is used to contain objects, such as images, audio, video, Java applets, ActiveX, PDF, and Flash.

The original intention of the object was to replace the img and applet elements. However, due to vulnerabilities and lack of browser support, this has not been achieved.

browser's object support depends on the object type. Unfortunately, mainstream browsers use different codes to load the same object type./Fortunately, the object provides a solution. If the object element is not displayed, the code located between <object> and <

In this way, we can nest multiple object elements (each corresponding to a browser).5object>. 4.01Compared to the <embed> tag, the <object> tag is more commonly used to embed external resources because the <object> tag contains code between HTML

HTML 4.01 HTML5and XHMTL are compatible.

with HTML 4.01 Some differences in HTML5 Attribute in HTML

"form" is not supported in HTML.5 Define a new attribute.

In HTML5 In HTML, objects can be submitted in a form.

In HTML5 In HTML, objects no longer appear within the <head> element area.

Attribute

AttributeValueDescription
aligntop bottom middle left rightHTML5 No soportado. HTML 4.01 Obsoleto. Specify the alignment of the <object> element relative to the surrounding elements.
archiveURLHTML5 Not supported. A list of URLs separated by spaces pointing to archive files. These files contain resources related to the object.
borderpíxelesHTML5 No soportado. HTML 4.01 Obsoleto. Specify the border width around the <object>.
classidclass_IDHTML5 Not supported. Defines the ID value of a class embedded in the Windows Registry or at a URL, this attribute can be used to specify the location of the object included in the browser, usually a Java class.
codebaseURLHTML5 Not supported. Defines where the code required by the object can be found, providing a base URL.
codetypeMIME_typeHTML5 Not supported. The MIME type of the code referenced by the classid attribute.
dataURLDefine the URL of the resource used by the object.
declaredeclareHTML5 No soportado. Define que el objeto solo puede declararse, pero no puede crearse o instanciarse hasta que el objeto se aplique.
formHTML5form_idDefine un o varios formularios a los que pertenece el objeto.
heightpíxelesDefine la altura del objeto.
hspacepíxelesHTML5 No soportado. HTML 4.01 Obsoleto. Define el espacio en blanco izquierdo y derecho del objeto.
namenameDefine el nombre del objeto.
standbytextHTML5 No soportado. Define el texto que se muestra mientras el objeto se está cargando.
typeMIME_typeDefine el tipo MIME del tipo de datos especificado en la propiedad data.
usemap#mapnameDefine el nombre del mapa de imágenes cliente utilizado junto con el objeto.
vspacepíxelesHTML5 No soportado. HTML 4.01 Obsoleto. Define el espacio en blanco superior e inferior del objeto.
widthpíxelesDefine el ancho del objeto.

Atributos globales

<object> etiqueta admite atributos globales, consulte la tabla de atributos completa Atributos globales HTML.

atributos de eventos

<object> etiqueta admite todos los Atributos de eventos HTML.

Artículos relacionados

Tutoriales HTML:Elemento HTML