El elemento HTML <object>
representa un recurso externo, que puede ser tratado como una imagen, un contexto de navegación anidado, o como un recurso que debe ser manejado por un plugin.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
La fuente original de este ejemplo interactivo está almacenada en un repositorio de GitHub. Si quieres contribuir al proyecto de ejemplos interactivos, por favor clona https://github.com/mdn/interactive-examples y envíanos un pull request.
Content categories | Flow content; phrasing content; embedded content, palpable content; if the element has a usemap attribute, interactive content; listed, submittable form-associated element. |
---|---|
Contenido permitido | cero o más elementos <param> , luego transparent. |
Tag omission | None, both the starting and ending tag are mandatory. |
Padres permitidos | Cualquier elemento que acepte embedded content (contenido incrustado). |
Permitted ARIA roles | application , document , image |
Interfaz DOM | HTMLObjectElement |
Atributos
Este elemento incluye los global attributes.
archive
HTML 4 onlyObsoleto HTML5- Una lista separada por espacios de las URl's de archivos o recursos para el objeto.
border
Desaprobado HTML4.01Obsoleto HTML5- El grosor de una línea de margen alrededor del control, en pixeles.
classid
HTML 4 onlyObsoleto HTML5- The URI of the object's implementation. It can be used together with, or in place of, the data attribute.
codebase
HTML 4 onlyObsoleto HTML5- The base path used to resolve relative URIs specified by classid, data, or archive. If not specified, the default is the base URI of the current document.
codetype
HTML 4 onlyObsoleto HTML5- The content type of the data specified by classid.
data
- La dirección de la fuente, escrita como una URL válida. Al menos uno de los dos atributos, data o type, deben estar definidos.
declare
HTML 4 onlyObsoleto HTML5- The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent
<object>
element. In HTML5, repeat the <object> element completely each that that the resource is reused. form
HTML5- El elemento form, si es que hay alguno, al que el objeto está asociado (su form propietario). El valor de este atributo debe ser el ID de un elemento
<form>
del mismo documento. height
- La altura del recurso mostrado, en CSS pixels. -- (Valores absolutos unicamente. NO percentages)
name
- El nombre de un contexto de navegación válido (HTML5), o el nombre del control (HTML4).
standby
HTML 4 onlyObsoleto HTML5- A message that the browser can show while loading the object's implementation and data.
tabindex
HTML 4 onlyObsoleto HTML5- The position of the element in the tabbing navigation order for the current document.
type
- El content type del recurso especificado mediante data. Al menos uno de los dos atributos, data o type, deben estar definidos.
typemustmatch
HTML5- Este valor booleano indica si el atributo type y el content type real del recurso deben coincidir para porder ser usados.
usemap
- Una refercia hash-name a un elemento
<map>
; es decir un '#' seguido del valor de unname
de un elemento map. width
- El ancho del recurso mostrado, en CSS pixels. -- (Valores absolutos unicamente. NO percentages)
Ejemplos
Incrustar una película flash
<!-- Incrustar una película flash -->
<object data="movie.swf"
type="application/x-shockwave-flash"></object>
<!-- Incrustar una película flash con parámetros -->
<object data="movie.swf" type="application/x-shockwave-flash">
<param name="foo" value="bar">
</object>
Especificaciones
Especificación | Estado | Comentario |
---|---|---|
HTML Living Standard La definición de '<object>' en esta especificación. |
Living Standard | |
HTML5 La definición de '<object>' en esta especificación. |
Recommendation | |
HTML 4.01 Specification La definición de '<object>' en esta especificación. |
Recommendation |
Compatibilidad con Navegadores
BCD tables only load in the browser