English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML object vspace attribute

The vspace attribute specifies the white space at the top and bottom of the object.

 HTML <object> tag

Online Example

Top and bottom margins are50-pixel object:

<!DOCTYPE html>
<html>
<head>
<title>HTML: object vspace attribute - Basic Tutorial Website(oldtoolbag.com)</title>
</head>
<body>
<h4>Object without vspace:</h4>
<p><object width="15"0" height="15"0" data="bookmark.swf"></object> 
This is some text. This is some text. This is some text.</p>
<h4>Object with vspace:</h4>
<p><object width="15"0" height="15"0" data="bookmark.swf" vspace="5"0"></object> 
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the vspace attribute.

Definition and Usage

HTML5 The <object> vspace attribute is not supported. Please use CSS instead.

In HTML 4.01 The vspace attribute of <object> is deprecated.

The vspace attribute specifies the blank space at the top and bottom of the object.

Compatibility Notes

In HTML 4.01 In the following example, the vspace attribute of <object> is deprecated. Please use CSS instead.

CSS syntax: <object style="margin: 100px 0px">

CSS Example: <object> with margin

In our CSS tutorial, you can find more about margin propertydetails.

Syntax

<object vspace="pixels">

Attribute Value

ValueDescription
pixelsThe blank space at the top and bottom of the object, in pixels.
 HTML <object> tag