The height attribute on an <object> tag sets the height of the object element.
The height is specified in pixels - without the ‘px‘ unit.
An <object> element with a height attribute.
<object data="/media/sample.pdf"
type="application/pdf"
height="500" style="width:100%">
PDF cannot be displayed.
</object>
The height attribute specifies the height of the object element.
The height is specified in pixels -- without the 'px' unit.
Percentages (%) are not allowed, but most browsers do support it.
<object height="pixels">
Value | Description |
---|---|
pixels | Height of the object element in pixels. |
Here is when height support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |