Embed height attribute
Definition and usage
height
Attribute setting or returning the value of the height attribute of the <embed> element.
<embed> height attribute Define the height of the embedded content in pixels.
Tip:Use: width attribute Set or return the height attribute of the <embed> element. width attribute Value.
See also:
Manual de referencia de HTML:Etiqueta <embed> de HTML
Example
Example 1
Change the height of the embedded file to 500 pixels:
document.getElementById("myEmbed").height = "500";
Example 2
Return the height of the embedded file:
var x = document.getElementById("myEmbed").height;
Example 3
Change the height and width of the embedded file to 500 pixels:
document.getElementById("myEmbed").height = "500"; document.getElementById("myEmbed").width = "500";
Syntax
Return the height attribute:
embedObject.height
Set the height attribute:
embedObject.height = pixels
Attribute value
Value | Description |
---|---|
pixels | Define the height of the embedded content, in pixels (for example, height="100"). |
Detalles técnicos
Valor devuelto: | Valor numérico que representa la altura del contenido incrustado en píxeles. |
---|
Compatibilidad del navegador
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Soporte | Soporte | Soporte | Soporte | Soporte |
Páginas relacionadas
Manual de referencia de HTML:Atributo height del <embed> de HTML