HTML | <object> vspace Attribute
The HTML <object> vspace Attribute is used to specify the number of whitespace on the bottom and top side of an object.
Syntax:
<object vspace="pixels">
Attribute:
- pixels: It specifies the number of whitespaces on the top and bottom of an object in terms of pixels.
Note: The <object> vspace Attribute is not supported in HTML 5.
Below examples illsutrate the <object> vspace attribute in HTML:
Example 1: In this example the object with 50px margin on top and bottom.
<!DOCTYPE html> <html> <head> <title> HTML object vsapce Attribute </title> </head> <body> <center> <h1 style="color:green">GeeksforGeeks</h1> <h4> HTML <object> vspace Attribute </h4> <br> <object data= width="350px" height="150px" vspace=50> GeeksforGeeks </object> </center> </body> </html> |
Output:

Example 2:
<!DOCTYPE html> <html> <head> <title> HTML object vsapce Attribute </title> </head> <body> <center> <h1 style="color:green">GeeksforGeeks</h1> <h4> HTML <object> vspace Attribute </h4> <h4>Object without vspace:</h4> <object data= width="50%" height="150px"> GeeksforGeeks </object> <h4>Object with 25 vspace:</h4> <object data= width="50%" height="150px" vspace="25"> GeeksforGeeks </object> </center> </body> </html> |
Output:

Supported Browsers: The browsers supported by HTML <Object> vspace attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | <img> vspace Attribute
- HTML | Marquee vspace attribute
- HTML | rel attribute
- HTML | <bdo> dir Attribute
- HTML | <map> name Attribute
- HTML | max attribute
- HTML | name Attribute
- HTML | <a> rel Attribute
- HTML | alt attribute
- HTML | value Attribute
- HTML | <img> src Attribute
- HTML | <li> value Attribute
- HTML | dir Attribute
- HTML | min Attribute
- HTML | for Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : shubham_singh



