HTML <object> vspaceAttribute
Examples
An object with top and bottom margins of 100 pixels:
<p><object width="150" height="150" data="helloworld.swf" vspace="100"></object>
This is some text. This is some text. This is some text.</p>
This is some text. This is some text. This is some text.</p>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the vspace attribute.
Definition and Usage
HTML5 does not support the <object> vspace attribute. Please use CSS instead.
In HTML 4.01, the vspace attribute of <object>is deprecated。
The vspace attribute specifies the whitespace at the top and bottom of an object.
Compatibility Notes
In HTML 4.01, the vspace attribute of <object> is deprecated. Please use CSS instead.
CSS syntax: <object style="margin: 100px 0px">
CSS Example: <object> with margins
In our CSS tutorial, you can find more details aboutthe margin property.
Syntax
<object vspace="pixels">
Attribute Values
| Value | Description |
|---|---|
| pixels | The whitespace at the top and bottom of the object, in pixels. |
HTML <object> Tag Other Extensions