<object>
        
        
          
                Baseline
                
                  Widely available
                
                
              
        
        
        
          
                
              
                
              
                
              
        
        
      
      This feature is well established and works across many devices and browser versions. It’s been available across browsers since julio de 2015.
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.
Pruébalo
<object
  type="video/mp4"
  data="/shared-assets/videos/flower.mp4"
  width="250"
  height="200"></object>
| Content categories | Flow content;
        phrasing content;
        embedded content, palpable content; if the element has a usemapattribute,
        interactive content;
        listed,
        submittable
        form-associated
        element. | 
|---|---|
| Contenido permitido | cero o más elementos <param>, luego
        transparent. | 
| Tag omission | Ninguna, tanto la etiqueta inicial como la final son obligatorias. | 
| Padres permitidos | Cualquier elemento que acepte embedded content (contenido incrustado). | 
| Permitted ARIA roles | application,document,img | 
| Interfaz DOM | HTMLObjectElement | 
Atributos
Este elemento incluye los global attributes.
- archiveonly Obsoleto
- 
Una lista separada por espacios de las URl's de archivos o recursos para el objeto. 
- borderObsoleto
- 
El grosor de una línea de margen alrededor del control, en pixeles. 
- classidonly Obsoleto
- 
The URI of the object's implementation. It can be used together with, or in place of, the data attribute. 
- codebaseonly Obsoleto
- 
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. 
- codetypeonly Obsoleto
- 
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. 
- declareonly Obsoleto
- 
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
- 
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). 
- standbyonly Obsoleto
- 
A message that the browser can show while loading the object's implementation and data. 
- tabindexonly Obsoleto
- 
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
- 
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 unnamede 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
| Specification | 
|---|
| HTML> # the-object-element> | 
Compatibilidad con navegadores
Loading…