Change the height of an <object> element to 400px:
More "Try it Yourself" examples below.
The height property sets or returns the value of the height attribute of an <object> element.
The height attribute specifies the height of an object.
Tip: Use the width property to set or return the value of the width attribute of an <object> element.
Property | |||||
---|---|---|---|---|---|
height | Yes | Yes | Yes | Yes | Yes |
Return the height property:
Set the height property:
Value | Description |
---|---|
pixels | Specifies the height of the object, in pixels (e.g. height="100") |
Return Value: | A Number, representing the height of the object, in pixels |
---|
Get the height of an <object> element:
The result of x will be:
Change the height and width of an <object> element to 300px:
HTML reference: HTML <object> height attribute