English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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>.
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 ‹/›
IEFirefoxOperaOperaChrome
Safari
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
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 | Value | Description |
---|---|---|
align | top bottom middle left right | HTML5 No soportado. HTML 4.01 Obsoleto. Specify the alignment of the <object> element relative to the surrounding elements. |
archive | URL | HTML5 Not supported. A list of URLs separated by spaces pointing to archive files. These files contain resources related to the object. |
border | píxeles | HTML5 No soportado. HTML 4.01 Obsoleto. Specify the border width around the <object>. |
classid | class_ID | HTML5 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. |
codebase | URL | HTML5 Not supported. Defines where the code required by the object can be found, providing a base URL. |
codetype | MIME_type | HTML5 Not supported. The MIME type of the code referenced by the classid attribute. |
data | URL | Define the URL of the resource used by the object. |
declare | declare | HTML5 No soportado. Define que el objeto solo puede declararse, pero no puede crearse o instanciarse hasta que el objeto se aplique. |
formHTML5 | form_id | Define un o varios formularios a los que pertenece el objeto. |
height | píxeles | Define la altura del objeto. |
hspace | píxeles | HTML5 No soportado. HTML 4.01 Obsoleto. Define el espacio en blanco izquierdo y derecho del objeto. |
name | name | Define el nombre del objeto. |
standby | text | HTML5 No soportado. Define el texto que se muestra mientras el objeto se está cargando. |
type | MIME_type | Define el tipo MIME del tipo de datos especificado en la propiedad data. |
usemap | #mapname | Define el nombre del mapa de imágenes cliente utilizado junto con el objeto. |
vspace | píxeles | HTML5 No soportado. HTML 4.01 Obsoleto. Define el espacio en blanco superior e inferior del objeto. |
width | píxeles | Define el ancho del objeto. |
<object> etiqueta admite atributos globales, consulte la tabla de atributos completa Atributos globales HTML.
<object> etiqueta admite todos los Atributos de eventos HTML.
Tutoriales HTML:Elemento HTML